Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Companion

Hello, I've been using fitbit as part of a research in my university. I developed a custom app that basically asks some questions to the user and stores the results of those questions and then tries to send it via the fetch API.

 

The things is, I was able to successfully send the info to my server, which is written in Java, mainly using Spring Boot but on the last couple weeks I noticed some things. The companion doesn't seem to be trustful, multiple times I've lost data or the request was not made for some random reason. I'm using the file transfer API and when the requests fail I save the data in files so that I can send it later, even using this process it seems that somedays I don't get as much data as I would expect. I've been using the app for almost a week now with a group of 4 people.

 

I'm trying to debug it the best that I can and to understand what's going on but it looks like there are no good ways of actually debugging it after deployment other than looking at my server logs.

Best Answer
0 Votes
1 REPLY 1

There's a few things which can impact the companion, mainly it's the mobile phone OS performing battery optimisation and suspending the Fitbit app. Ensure that it's allowed to run in the background.

 

I would also try either sending some messages from the device to the companion, or scheduling the companion to wake every 15 minutes, and periodically check for connectivity.

 

https://dev.fitbit.com/build/guides/companion/#periodic-wake-interval

Best Answer
0 Votes