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

Phone connection state from device

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 Answer
0 Votes
2 REPLIES 2

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 Answer
0 Votes

I made an app for this 🙃 It is called "Last Synced

 

 

Best Answer