07-11-2022 13:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-11-2022 13:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello! I am working on a research study which uses wearable sensors. We need to log raw accelerometer and heart rate data, and we were considering using the Fitbit Sense for this purpose. Our understanding is that the Device API provides access to that data, and that we could write a custom app to log this data for the duration of the study. However, we have a few concerns we were hoping could be addressed:
1) Are there any built-in features which would allow us to collect this raw data without writing a custom application? We can do so if necessary, however.
2) We are concerned about the user accidentally exiting out of the application while collecting data unsupervised. Is there a way to run it such that the user cannot exit out easily, like as a background app or in a single-app locked mode?
3) What kind of battery life could we expect while running a custom application that logs this data? Is there a way to make it better optimized for battery life, like running it in the background or turning off the screen somehow?
4) Is there another device in the Fitbit line that we have missed which would better suit our needs?
Thanks in advance!

07-11-2022 14:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


07-11-2022 14:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Yes for heart-rate, but not for accelerometer.
- Third-party apps can't run in the background. I wouldn't say that clockfaces can be 'accidentally' exited, but they can be inadvertently closed if the user swipes the screen to change settings, etc. Apps (as opposed to clockfaces) offer more protection: the system doesn't act on swipes, and you can intercept presses of the physical key to prevent immediate exit.
- The screen will go off (or enter always-on display mode) automatically. I think battery life would still be good. The greater problem may be achieving reliable communications for extended periods.
- Any Versa could also do this.Older Versas can be harder to program because the dev environment and documentation have been partially deprecated, but if you can get a bargain... You might also want to consider whether you might want gyro data, since accel data doesn't indicate direction (orientation) in terms of up, down, etc. Sense has gyro, but currently-available Versas don't.
The architecture of a system to collect accel data is messy. Accelerometer Fetcher here may help. I think there are bugs in that (or the Android side of it) somewhere.
Gondwana Software

07-12-2022 12:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



07-12-2022 12:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Thank you @Gondwana . I'm moving this post to the SDK forum.
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
07-12-2022 21:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


07-12-2022 21:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ho @Gondwana - you mention it is possible to detect swipe right [close] in an app on a Sense, do you know how?
See How to stop an App closing with Swipe right?
Author | ch, passion for improvement.

07-12-2022 21:39 - edited 07-12-2022 21:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


07-12-2022 21:39 - edited 07-12-2022 21:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
07-12-2022 22:06 - edited 07-12-2022 22:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


07-12-2022 22:06 - edited 07-12-2022 22:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I'll test again but think it only applies to the watch back button.
Author | ch, passion for improvement.

07-12-2022 23:29 - edited 07-13-2022 01:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


07-12-2022 23:29 - edited 07-13-2022 01:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Thanks@Gondwana - unless this is not the process it doesn't block swipe right
document.onkeypress = function(evt) {
console.log("Key press ");
evt.preventDefault();
}
Pressing the button is detected - Swipe right isn't
Update: It needed this to work
document.addEventListener("beforeunload", (evt) => {
Updated How to stop an App closing with Swipe right?
Author | ch, passion for improvement.
