04-12-2019 12:01
04-12-2019 12:01
Im trying to send sensor readings to a companion app, due to the high frequency of readings im trying to reduce their size so they can be sent over the messaging API by storing them as different types, however if i send a typed array using the messaging API it gets turned into a UInt8Array when i check it in the companion, which loses too much precision.
Does anyone know why this is? Or if there is another way to reduce the size of the readings?
Best Answer04-15-2019 15:51
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
04-15-2019 15:51
You could try encoding the data on the device using CBOR, the decoding it in the companion.
import { decode, encode } from "cbor";
let encodedData = encode({some: "object"});
let decodedData = decode(encodedData);
Best Answer