10-09-2017 15:21
10-09-2017 15:21
I'm trying to do an app that connects to a REST service. I'm starting from the BART sample but I think I'm missing something to make it work. I am able to deploy to the Ionic and when I am doing UI only stuff it works fine, but I'm trying to add the http call the Ionic does not seem to connect to the phone to make the request. Syncing in the fitbit app is working and manually syncing it does update the Fitbit data, but the app still does not show connected.
It checks for the connection every 3 seconds, but the socket never shows connected.
messaging.peerSocket.readyState = 1
messaging.peerSocket.readyState != messaging.peerSocket.OPEN
Any suggestions? I've searched the forum but I haven't found posts of others having this problem, so hopefully I just missed something.
Answered! Go to the Best Answer.
10-09-2017 15:52
10-09-2017 15:52
When you have an app with a companion, the developer bridge needs to be enabled on the phone and the Ionic, then connect to both devices from Studio. When the app is installed on the device, the companion is installed on the phone.
10-09-2017 15:52
10-09-2017 15:52
When you have an app with a companion, the developer bridge needs to be enabled on the phone and the Ionic, then connect to both devices from Studio. When the app is installed on the device, the companion is installed on the phone.
10-09-2017 16:30
10-09-2017 16:30
Thanks, that was it. The fast reply is greatly appreciated.
02-27-2018 04:19
02-27-2018 04:19
I start with open weather on messaging guide (https://dev.fitbit.com/build/guides/communications/messaging/), when fitbit mobile application is active (companion running) it still get current weather but while it not active running on mobile, ionic app it will not get current weather from open api. Can it possible ionic query weather during fitbit mobile app not active running (run in backgroud)?
02-27-2018 04:55
02-27-2018 04:55
Ok, I solved by enabled All-Day-Sync on Fitbit mobile application that will allow ionic to communicate with companion while Fitbit mobile application not currently running.