01-10-2023 02:20 - edited 01-11-2023 04:12
01-10-2023 02:20 - edited 01-11-2023 04:12
Hello community!
I am working on an android application for showing the heart rate data, tick by tick on graph during some type of exercise / activity. So can not find appropriate API for the same purpose.
I used this API "https://api.fitbit.com/1/user/-/activities/heart/date/today/1d/1sec/time/16:46/16:48.json".
But in this API i didn't get the heart data simultaneously ( tick by tick ).
So it there any other way to do the same.
Please help me in suggesting the proper solution for my requirement.
01-10-2023 06:27
01-10-2023 06:27
The endpoint syntax you specified is correct. As stated in the documentation, the heart rate data is sampled outside of a recorded exercise. So, to guarantee you get the data as granular as possible, you'll need to initiate recording of the activity/exercise on a Fitbit device. After ending the recording and syncing your device, you should receive the heart rate data.
Gordon
01-10-2023 11:20
01-10-2023 11:20
@rahul_techahead wrote:...simultaneously ( tick by tick )...
If you mean 'instantaneously' (ie, near-real-time), you can't use the Web API. You'll need to use the Device and Companion APIs, as well as server code to receive the data.
That still won't give you 'beat by beat' data, but will be heart-rate values every second or so (if you use the Exercise API within the Device API).