04-30-2018 23:43
04-30-2018 23:43
Hi,
Is there a call to check whether the phone is connected? If the companion app isn't going to open I'd like my app to be able to move on and get to work locally.
Thanks,
Kev
Best Answer04-30-2018 23:59
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-30-2018 23:59
There isn't a specific API for this at the moment, but you could check the peerSocket state.
import * as messaging from "messaging"; // Some time later
if (messaging.peerSocket.readyState === messaging.peerSocket.CLOSED) {
// Not connected to mobile
}
https://dev.fitbit.com/build/guides/communications/messaging/
Best Answer10-05-2020 20:12