I have an ArrayList of parcelable custom items:
ArrayList<AudioLog> audioLogs = getAudioLogs();
I want to send this from the watch to the phone using the MessageAPI:
Wearable.MessageApi.sendMessage(googleClient, node.getId(), path, audioLogs).await();
BUT, I need to convert the entire ArrayList and its contents to a byte[], as the sendMessage method takes - (GoogleClient client, int id, String path, byte[] message).
To convert each of my parcelable AudioLog objects, I have a custom Util class that marshals and unmarshals each of them to a byte[]. I just need a similar class that can convert the whole ArrayList and its contents to a byte[] in the one go, if that's possible, thanks.