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

Can Phone Applications Make Use of Device API

ANSWERED

Hello everybody. VERY new developer here.

I was wondering if the different APIs offered by fitibit were only accessible by their respective hardware? Could I use the device API or web API to add functionality to an app? So, for example, could I create a phone app that uses the IHeartRateSensor interface from the Device API to pull my heartrate data directly from the device?

 

If yes, would my app only be able to access these APIs once I have authorized my app to access my fitbit account?

 

Thanks for reading!

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

A phone app can get data directly from the Web API, but that's only updated whenever the watch syncs (every 20 minutes or so).

A phone app can get data indirectly from the Device API, but it's difficult. You need to write a clockface or app that runs on the watch (device) that uses the Device API calls you want, passes the data to its companion code which runs on the phone, which uses fetch() or WebSocket to onforward it to a server. Your phone app could act as the server. This lets you get data in real time.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

A phone app can get data directly from the Web API, but that's only updated whenever the watch syncs (every 20 minutes or so).

A phone app can get data indirectly from the Device API, but it's difficult. You need to write a clockface or app that runs on the watch (device) that uses the Device API calls you want, passes the data to its companion code which runs on the phone, which uses fetch() or WebSocket to onforward it to a server. Your phone app could act as the server. This lets you get data in real time.

Peter McLennan
Gondwana Software
Best Answer
0 Votes