06-11-2021 09:36
06-11-2021 09:36
I am trying to pass an entire array of sensor readings to the companion through messaging.peerSocket.send(). However, the data gets encoded in a Uint8Array and I have trouble decoding it. Any help would be greatly appreciated.
Also, I am aware of the forum post: https://community.fitbit.com/t5/SDK-Development/Sending-Float32Array-to-companion-results-in-UInt8Ar.... The solution did not work for me though.
Thank you
06-11-2021 13:50
06-11-2021 13:50
Do you need the data in near-real-time? If not, try using file transfer. It's more reliable, and I've had some success transferring Int16Arrays.
I converted all readings to Int16 for transmission because transfer rates can be as slow as ~1 kB/sec, and the accelerometer can provide data faster than that (depending on representation).