07-12-2020 05:54
07-12-2020 05:54
I need to transfer data from my ionic to a server, and conversely, when the companion app is closed or in background using websocket, if possible. Is this possible or the companion app should be active?
Data will be in json or url encoded format
07-14-2020 16:46
07-14-2020 16:46
@MarcS7 wrote:I need to transfer data from my ionic to a server, and conversely, when the companion app is closed or in background using websocket, if possible. Is this possible or the companion app should be active?
Data will be in json or url encoded format
Hello Marc,
While the Ionic has WiFi and Bluetooth, the watch can only communicate with its peer, the companion app. The app does not need to be open though, as long as it has "run_background" permission.
Comms seem to work best when treated as asynchronous. The watch is not always connected to the app, the app is not always connected to the Internet, the Internet is not always timely. Data requests, data packets and receipts need to wait if the links are down and send when sockets are re-connected.
Regards,
Reign
07-15-2020 08:52 - edited 07-15-2020 08:53
07-15-2020 08:52 - edited 07-15-2020 08:53
@morningReign wrote:
@MarcS7 wrote:I need to transfer data from my ionic to a server, and conversely, when the companion app is closed or in background using websocket, if possible. Is this possible or the companion app should be active?
Data will be in json or url encoded format
Hello Marc,
While the Ionic has WiFi and Bluetooth, the watch can only communicate with its peer, the companion app. The app does not need to be open though, as long as it has "run_background" permission.
Comms seem to work best when treated as asynchronous. The watch is not always connected to the app, the app is not always connected to the Internet, the Internet is not always timely. Data requests, data packets and receipts need to wait if the links are down and send when sockets are re-connected.
Regards,
Reign
this solution can work for a constant flow of data? i didn't decide yet if the flow of data wil be constantly or not and i need to synchronize the data with the fitbit app or not?
basically my project is to control a object from remote and get some information and i will send some information, this is why i need to know if i need to synchronize the watch with the fitbit app.
07-15-2020 14:12
07-15-2020 14:12
The watch doesn't need to be synchronised with the companion, but it does need to be connected (obviously).
Companion app comms can be faster if the Fitbit app is running in the foreground, but I've been able to stream data at 30 messages per second with it running in the background.
07-15-2020 14:27 - edited 07-15-2020 14:27
07-15-2020 14:27 - edited 07-15-2020 14:27
30 messages per seconds will be enough, I will keep the app in background hoping that iOS will not kill the process the save ram
i will update this topic in case of help