What is the best way to send a data stream from the wearable to the phone? I have a watch which generates a constant stream of data, which I want to send to the phone. None of the data packets should get lost. That means data needs to be chached as long as there is no phone connected. Both mechanism of the Wearable Data Layer do not really suit my needs as far as I understand:
I am just new to wearable development, maybe the answer is kind of obvious and I just can't see it-
You have to use the ChannelAPI
. You can find the documentation here.
It is meant to be used to send large files but you can also open an InputStream
in a device and an OutputStream
in an other (see getInputStream).
I have already used that in a test project to stream touch events or accelerometer data and it works great (with a small latency though).