Skip to content Skip to sidebar Skip to footer

Android Wearable Api: How To Pass A Dynamic List?

This is how I'm using DataAPI PutDataMapRequest dataMapReq = PutDataMapRequest.create(PATH); dataMapReq.getDataMap().putFloatArray(KEY, list); PutDataRequest pu

Solution 1:

Yes, if you change an element in the array/list, you need to put another data item and it will replace the old one. That will cause retransmission to the other devices.

In general, I wouldn't worry about that retransmission. Since there is a limit of how much you can send in the DataItem, you are probably not sending too much data. If you are still worried about it, consider partitioning the data and sending several data items (for example send four sub-arrays of floats and merge them on the other side). Do not send each float a separate data item (enormous overhead).

Post a Comment for "Android Wearable Api: How To Pass A Dynamic List?"