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

Multiple trackers handling and subscriptions

Hi,

 

   With the new support for multiple trackers for a given user, I am wondering how does this affect the api and push notifications. Say a user has two devices A and B. If my application receives push notifications for this user how can I determine which device is reporting activity?

 

  Similarly if want to fetch the latest sleep data for device A how would one formulate this query?

 

  Subscription API. I've setup my users for push notifications but it seems that when I subscribe for all events the notification collection type always report "activities". So I have no clue which activity actually reported new data ie hr, steps, sleep?? - I understand I can add subsriptions for each individual activity but I would like to be able to say notify me when a new activity is reported and expect the notification to contain a clue as to which activity actually changed. Lastly if a user update her profile it doesn't seem that this event triggers a notification?

Best Answer
0 Votes
12 REPLIES 12

Activity type basically means one of following things changed for user:

steps, calories, elevation, distance. 

When you get notification with activities type I'd just suggest to make activities request for that date.

 

For sleep you'll get different notification type.

See more details at: https://wiki.fitbit.com/display/API/Fitbit+Subscriptions+API

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

Makes sense. Thank you! - Can you also answer the other questions that are part of the original post ie tracking push notifications when multiple devices for a given user are at play.

 

Thanks!

Best Answer
0 Votes

I'm confused with your last post.

To answer this question:

[ Lastly if a user update her profile it doesn't seem that this event triggers a notification?]

 

Yes this is correct. We do not send push notifications when user updates his profile. 

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

Sorry. That was indeed confusing. Let me rephrase...

 

Say a user has 2 trackers A and B. User registers with fibit for push notifications.

 

1) How do I know which of the 2 devices trigger the notification? ie steps activity was collected for device A or B.

2) Once I get a notification. How does one request metric data for a given device?

ie I want to get steps/sleep/hr for device A or B.

 

I am not seeing in the api where one would request steps data for a specific device. What am I missing?

Best Answer
0 Votes

This is currently not possible.

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

Thanks for the reply. Can u elaborate? This feature is available in the dashboard. I can see metrics reported for each of my devices. Is this feature coming in the API or will not at all be supported?

 

 

Best Answer
0 Votes

We currently have no plans on supporting it. It may change in future though. No promises or estimations yet.

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

Woa! This is surprising. Just to make sure we're on the same page here. 

 

Are you saying that this announcement https://blog.fitbit.com/sync-multiple-trackers-to-your-fitbit-account-with-multi-tracker-support/ will NOT be supported or planned to be supported by the API?

 

Sorry to beat this dead horse if so.

 

Thanks!

Best Answer
0 Votes

I'm saying that there is no plans for API push notifications to be saying what device the push notification belongs to. 

I'm also saying that it may change. I just don't want to give any promises.

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes

Understood - So to be clear,  since there are 2 separate use cases here: Outside of the push notification is there a way to request a given metric for a given device then? Or is this not supported either?

 
Ie Fetch sleep data for device A or retrieve steps data for device B?
Best Answer
0 Votes

@derailed wrote:

Thanks for the reply. Can u elaborate? This feature is available in the dashboard. I can see metrics reported for each of my devices. Is this feature coming in the API or will not at all be supported?

 

 


@derailed How do you see the data in the dashboard separately for your two trackers? (The whole point of Fitbits multi-tracker support is that you only wear one Fitbit at a time and the data is combined automatically so you only see one set of data for all of your trackers.)

 

I certainly can't find any way to see just the data for one of my trackers linked to my account through the dashboard.

Best Answer
0 Votes

@derailed wrote:

Sorry. That was indeed confusing. Let me rephrase...

 

Say a user has 2 trackers A and B. User registers with fibit for push notifications.

 

1) How do I know which of the 2 devices trigger the notification? ie steps activity was collected for device A or B.


The device sync itself doesn't trigger the notification—the change in data triggers the notification. A change in data could come from a tracker or a manual log. The Subscriptions API doesn't currently give a reason for the change in data.


@derailed wrote:

2) Once I get a notification. How does one request metric data for a given device?

ie I want to get steps/sleep/hr for device A or B.

 

I am not seeing in the api where one would request steps data for a specific device. What am I missing?


Fitbit intelligently combines data from multiple devices and sensors. The data is available in a unified manner, not per device.

Best Answer