Hey everyone,
Posting data using the Fetch API in the companion app requires an internet connection
However, what happens with the data when such internet connection is not provided?
Does the Fetch API buffer all the post requests until a stable connection is available?
Or will all requests be lost (because internal storage is not provided inside the companion app itself)?
Best,
Bram
Answered! Go to the Best Answer.
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.
You have 5mb storage in the companion https://dev.fitbit.com/build/reference/companion-api/local-storage/
Best Answer
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.
Ah ok,
But what are the possibilities to handle such failures?
From other posts, I've concluded that it is not possible to store intermediate data in the companion app... When a post request (with e.g. data from the ionic) fails, then this data will be lost forever?
Best Answer
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.
You have 5mb storage in the companion https://dev.fitbit.com/build/reference/companion-api/local-storage/
Best AnswerThanks for the info!
I will provide my own fallback mechanisms when fetching the data using this internal storage as buffer.
Best Answer