06-07-2021 20:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-07-2021 20:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I want to build an app that can connect to fibit devices. After receiving heart rate data, it is automatically sent to the cloud in real time. Is it possible?
Answered! Go to the Best Answer.

Accepted Solutions
06-07-2021 23:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-07-2021 23:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
- You need to write a clockface or app that must stay running on the watch,and which sends data (probably using messaging) to a companion component.
- You need to write a companion component that receives messages from the watch and sends them to a server (ideally using WebSockets if you want real-time).
- You may need to write server code to receive the data from the companion and foward it to 'the cloud'.
- You have to use HTTPS or WSS for server communications unless you're running the server on your phone. Self-signed certificates aren't accepted.
- The companion component can't run continually for long periods.
Gondwana Software
06-07-2021 20:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-07-2021 20:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yes, but it is very difficult.
Gondwana Software

06-07-2021 22:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-07-2021 22:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
can you tell me why not?

06-07-2021 23:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-07-2021 23:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
- You need to write a clockface or app that must stay running on the watch,and which sends data (probably using messaging) to a companion component.
- You need to write a companion component that receives messages from the watch and sends them to a server (ideally using WebSockets if you want real-time).
- You may need to write server code to receive the data from the companion and foward it to 'the cloud'.
- You have to use HTTPS or WSS for server communications unless you're running the server on your phone. Self-signed certificates aren't accepted.
- The companion component can't run continually for long periods.
Gondwana Software
06-09-2021 19:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-09-2021 19:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
can i confirm?
The companion component can't run continuously for long periods.
are you talking about the application that runs on the phone that cannot run continuously for a long time, right?

06-09-2021 20:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-09-2021 20:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
That's right. The companion bit actually runs 'within' the Fitbit app, but it can't run continually because of phone operating systems' power-saving requirements.
It usually restarts when it receives a communication from the watch, but communications tend to be a bit troublesome. Sometimes it's necessary to restart things to get them going again.
Gondwana Software
06-09-2021 21:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-09-2021 21:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
If the phone is always in charge state. does the operating system require power saving?
If the operating system does not require power saving, the application can run continuously right?

06-09-2021 21:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-09-2021 21:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
I don't know. You'd need to test it. I suspect it wouldn't be allowed to run continuously anyway.
Gondwana Software
06-09-2021 21:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-09-2021 21:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you. I will test it.
I ask that because when playing games on the phone, especially online games, the essence of the app running on the phone is also transmitting data from the phone to the server while still ensuring real-time. So turning on the app is completely capable of running for a long time until the phone runs out of battery.

06-09-2021 22:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-09-2021 22:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
What you say makes sense. I hope you're right!
The other problem is comms reliability over long periods. You might need to implement dummy comms in your test to properly explore the companion life-cycle, so you may kill two birds with one stone.
Gondwana Software
