08-18-2022 03:32
08-18-2022 03:32
I have a fitbit application that is composed from a device app and companion. Every 30 seconds I ping the companion app asking for new data (and also for keeping it alive).
This works well for a few hours, but after some time the condition below is never true, and I can not send anything.
if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) {
}
Is there anything that I can do that might make this happen?
Anything that I can do in order to close the socket and open it again?
The phone and device are connected through bluetooth, and are able to sync.
08-18-2022 03:33
08-18-2022 03:33
One thing that I forgot to mention is that the code can be found here:
https://github.com/sulkaharo/nsfitbit