Android Wearable API: how to pass a dynamic List? -


this how i'm using dataapi

    putdatamaprequest datamapreq = putdatamaprequest.create(path);     datamapreq.getdatamap().putfloatarray(key, list);     putdatarequest putdatareq = datamapreq.asputdatarequest();     wearable.dataapi.putdataitem(mgoogleapiclient, putdatareq); 

list array[] or arraylist<>. if add new element i'll have put list in data map again. cause retransmission of every inserted elements?

yes, if change element in array/list, need put data item , replace old one. cause retransmission other devices.

in general, wouldn't worry retransmission. since there limit of how can send in dataitem, not sending data. if still worried it, consider partitioning data , sending several data items (for example send 4 sub-arrays of floats , merge them on other side). do not send each float separate data item (enormous overhead).


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -