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

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

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

javascript - Restarting Supervisor and effect on FlaskSocketIO -