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.
It reproes pretty consistently. I have iOS.
Keep the phone off (not turned off, but screen off), then launch the app.
My app (not a watch face) is pretty simple: it just shows a message from the companion while keeping the display on; the companion sends a message to the app every five seconds.
The first time I launch the app nothing happens (approx 95% of the times; remaining 5% it works ok). I've tried having the app send a message to the companion with no improvement. Once the app is in this state the companion never wakes up (I've waited a couple of minutes). Close the app. Relaunch the app, everything works. Close/Reopen/Close/Reopen everything still works.
Things will get worst if I manually kill the fitbit app on the phone as it will take multiple launches to wake up the companion.
I have set it up as a quick access app, so I keep testing the reliability pretty often. I can share the code as it's pretty much what I described.
Best AnswerI have to add: when connected to Fitbit studio everything works all the times.
There seems to be a racing condition that prevents to companion to wake up when the app signals the phone via BT.
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.
Strange. Can you DM me a project export and I'll have the iOS team take a look?
Best AnswerPM sent. I've also just updated to iOS 11.3, let's see if that makes things better, since the device was pretty sluggish before the upgrade. I still believe the race condition might be there, more data will be useful anyway.
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.
Damn, I can't reproduce it here, but admittedly I am on beta firmware and beta mobile app.
I wasn't on iOS 11.3 either, just updating now.
Best AnswerNo improvements with 11.3
I wonder if having it assigned as a quick launch app has an effect on it. Will do more tests by launching the app by clicking on the icon.
Best AnswerMy way to repro so far.
Assign it as a quick launch app. Every once in a while, I click on the associated button and I wait for 10 secs. Usually companion starts in less than 3 secs. But when I launch it the first time it doesn't work.
Best AnswerOK, quick launch vs. regular launch doesn't make any difference.
The problem is that this line doesn't have any effect:
messaging.peerSocket.send(data);
No exception, but the companion never receives the message, so never aknowledges back. Let me see if I can initiate the communication both ways.
Best AnswerOK, more experimenting. The companion is now supposed to ping the app.
When the bug reproes, the companion doesn't show signs of life.
On the next attempt the wake up is instantaneous. Makes me think that a race condition in the FitBit app is a strong possibility.
Best AnswerSpent more time with attempts.
It happens now less frequently (iOS 11.3 I guess), but it keeps happening.
I can confirm that it seems the companion never starts on some launches.
Best Answer