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

Accelerometer Data

ANSWERED

Hello,

I am having a hard time in finding this information.  Currently, we are integrating with an Apple Watch and we are thinking about integrating a Fitbit Charge 5 into our Sleep application which is built in Swift.  Our app is dependent on accelerometer data.

 

  1. Using Swift, can we access the Raw Accelerometer data on the Charge 5?  If so, can we query historical data?  This would be done via Bluetooth.
  2. Or, does the Swift App have to make Http Requests to the FitBit API to retrieve this data?  Again, we would need to query historical data.  When is this data updated?  Is that up to the user?
  3. If the Fitbit Charge 5 does not support this, what Fitbit devices have this support?

Thank you,

myRW

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Accel data can't be obtained from Charge 5. You'd need to use a Fitbit OS device (Versa* or Sense*).

Accel data isn't available from the Web API, probably because there would be too much of it to transfer.

You can get accel data from the Device API. You'd need to write a clockface or app that runs on the watch to collect this.

Accel data has to be collected in real-time on the watch.

You'd need to write code to transfer the data from the watch to the app/clockface companion code on the connected phone, and to send it from there to a server.

You may need to clarify what you mean by 'raw' data. You don't get access to the hardware; you can only get accel data from the API.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
0 Votes
10 REPLIES 10

Hello @myRW and welcome to the Community.  I'm moving your post to one of the developer forums.  It's a better fit for your question.  This forum's focus is Charge 5 users with device issues.

Community Council Member

Laurie | Maryland, USA

Sense 2, Luxe, Aria 2 | iOS | Mac OS

Take a look at the Fitbit help site for further assistance and information.

Best Answer
0 Votes

Thank you @LZeeW .  Can you post the new link?

Best Answer
0 Votes

@myRW   No new link is needed.  The whole thread is moved and it is if it were there all along.

Community Council Member

Laurie | Maryland, USA

Sense 2, Luxe, Aria 2 | iOS | Mac OS

Take a look at the Fitbit help site for further assistance and information.

Best Answer
0 Votes

Accel data can't be obtained from Charge 5. You'd need to use a Fitbit OS device (Versa* or Sense*).

Accel data isn't available from the Web API, probably because there would be too much of it to transfer.

You can get accel data from the Device API. You'd need to write a clockface or app that runs on the watch to collect this.

Accel data has to be collected in real-time on the watch.

You'd need to write code to transfer the data from the watch to the app/clockface companion code on the connected phone, and to send it from there to a server.

You may need to clarify what you mean by 'raw' data. You don't get access to the hardware; you can only get accel data from the API.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Thank you so much for your reply.  It is very helpful.  When I say the Raw data, I mean the X,Y,Z accelerometer data at a certain frequency.  For example, 50hz.

 

Just to confirm, there is no way to query historical accelerometer on these devices?  It has to be done in real-time.

 

Last, if you have any examples of an app/clockface that queries accelerometer data, I would appreciate it.  If not, I will continue my search.

 

Thanks again for your help.

Best Answer
0 Votes

Documentation.

Accel data isn't stored on the devices or transferred elsewhere by the operating system (probably because there's no need and there's too much of it).

There's at least one (bad) example here (Accelerometer Fetcher).

Be warned that this is fairly difficult!

Peter McLennan
Gondwana Software
Best Answer
0 Votes

One more question.  Let's say that we create a Clockface or an Application.  I read somewhere if the app is running and the user switches to another app (Settings for example), the streaming of data to our app would be stopped.  Is that correct?

Best Answer
0 Votes

Yes, at least on Versa 3 and Sense 1 and earlier devices. Behaviour on the newest devices hasn't been announced yet.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

What about the Versa 4 or the Sense 2?  

Best Answer
0 Votes

Behaviour on the newest devices hasn't been announced yet.

Peter McLennan
Gondwana Software
Best Answer
0 Votes