0

I am currently developing an app on wear os. This app uses HealthService to collect user health information when exercising (for example walking - ExerciseType = Walking). The collected information is the amount of calories consumed during exercise and heart rate.

The problem is as follows:

  1. With the test device is Pixel watch 2 with operating system is wear os 5.0. My app cannot collect calories consumed during exercise if I am not logged into my fitbit app account.
  2. With the test device is Pixel watch 3 with operating system is wear os 5.1. Unable to get calories burned information whether logged in or logged out of the Fitbit app.

I tested on a virtual machine with the same operating system and the information is still normal.

Below are the permissions granted to my app:

<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="android.permission.BODY_SENSORS" />
<uses-permission android:name="android.permission.BODY_SENSORS_BACKGROUND" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_HEALTH" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
3
  • 1
    Fitbit on Pixel Watch should not affect 3rd party apps. If you run the Exercise Client sample on Github, are you able to see the calories information? github.com/android/health-samples/tree/main/health-services/… Commented May 23 at 17:13
  • @Breana Thanks for commenting! I tested the Exercise Client sample on Github, and calories can still be retrieved normally. Commented May 24 at 0:21
  • 1
    That suggests there may be something else in your app that is causing calories to not be collected. Maybe something related to how your app requests permissions? Commented May 27 at 14:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.