Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Build an App

ANSWERED

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?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions
  • 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.
Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
9 REPLIES 9

Yes, but it is very difficult.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

can you tell me why not?

Best Answer
0 Votes
  • 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.
Peter McLennan
Gondwana Software
Best Answer

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?

Best Answer
0 Votes

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.

Peter McLennan
Gondwana Software
Best Answer

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?

Best Answer
0 Votes

I don't know. You'd need to test it. I suspect it wouldn't be allowed to run continuously anyway.

Peter McLennan
Gondwana Software
Best Answer

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.

Best Answer
0 Votes

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.

Peter McLennan
Gondwana Software
Best Answer