I'm unable to communicate with the companion app when running the app from the Ionic and using the simulator as the phone. The error message returned is that the socket is closed.
It appears that the companion app does not start up in the simulator. I don't get any console messages from the companion app.
Under settings, the simulator reports that the companion bridge is connected to the debugger.
Any ideas?
My environment:
Windows 10
CLI sdk 3.0
Simulator version 0.6.4
Ionic OS 3.0 version 27.33.1.30
Thanks,
Rich
Answered! Go to the Best Answer.
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.
You cannot mix physical and simulated devices. It will let you sideload (because Studio/sdk-cli doesn't know the two devices aren't connected), but it will not work and isn't supported.
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.
Hi Jon,
There is no response at all from the companion. The very first line in the companion is to display "companion running" to the console log and to display if the companion was launched by the application. Neither one comes up. I just tested the application using the Ionic and my cell phone instead of the simulator. That worked, the companion was loaded onto the phone and the console displayed the appropriate messages. I tried migrating the app to Fitbit Studio hoping that might be better. It was the same. I'm in the process of simplifying the code to make a base case to test against.
So far the combinations that work are when the phone and companion are both using the simulator or neither one is using the simulator.
I'll let you know how I make out with the simplified code.
Thanks,
Rich
Best AnswerI've always found the combination of physical watch and simulated companion to be unreliable. When I need to test on a physical watch, I resort to using a physical companion (so to speak).
Calling it unreliable, in my case, would be giving it way to much credit 🙂 That would imply that it works, at least, sometimes. I'd be interested in hearing from others on their success (or not).
So the question is:
Do you find the companion to be reliable when testing if
(A) the watch is a physical device and the companion is the simulator,
or the reverse,
(B) the watch is the simulator and the companion is the physical device (cell phone)?
I've had it working occasionally, although I gave up on 'mixed' configurations a while ago.
IIRC, the least unreliable approach was:
CLI will see that the only available device is the phys watch and will switch to that, while hopefully leaving the sim companion connected. Maybe.
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.
You cannot mix physical and simulated devices. It will let you sideload (because Studio/sdk-cli doesn't know the two devices aren't connected), but it will not work and isn't supported.
Best AnswerThanks for the update. It would be nice if that was documented. Can I add to the list of things to do, an edit that would prohibit the Studio and/or cli from trying?
Best Answer