Android Wear: DataItem API vs Channel API -
i need collect sensor data on android wear device , want stream on android smartphone. is, have regular set of values want send on phone on extended period of time. data rate not high, say, 100 samples per second, 20 bytes per measurement sample. seems either implemented series of dataitems (for dataitem api) or series of small blobs (for channelapi). both dataitem , channel apis work. there reason choose 1 or other? other questions: 1) i've read android docs , looks dataitem protocol allows caching , retransmission in case of dodgy wireless transport. channelapi also? 2) push each sample measurement on separate item (or blob) , expect these accumulate on time. makes sense once phone receives data (and copies local storage) should remove dataitem (or blob). affect data on wear device? thanks!
okay, i'm answering own question. after several months working datalayer api, can works , surprisingly robust. have 3 wear devices each pushing 100hz sensor data common android phone app , works flawlessly no data bottlenecks. works when outside , near wifi ap. regarding questions: 1) yes, caching works , have not yet encountered issue missing packets. don't know channel api though. 2) haven't found issue. 1 writes data object on wear device, issue putrequest , appears on phone side call ondatachanged(). how handled in background blissfully transparent.
Comments
Post a Comment