You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please complete the following information for each phone and/or emulator you're experiencing this bug on:
Device: Samsung Galaxy A05s
OS: Android 14
Describe the bug
When running Health().requestAuthorization with the types STEPS and WORKOUT only, the types TOTAL_CALORIES_BURNED and DISTANCE_WALKING_RUNNING are also requested. Since they are not specified in our list of types, Health().hasPermissions always returns false, prompting Health().requestAuthorization to run every time we want to access health data.
To Reproduce
const _types = [
HealthDataType.STEPS,
HealthDataType.WORKOUT
];
// Triggers a request for permissions including TOTAL_CALORIES_BURNED and DISTANCE_WALKING_RUNNING
// which were not requested.
await Health().requestAuthorization(_types);
// Returns false even though the requested permissions are granted. Presumably since it also (for some reason) checks
// TOTAL_CALORIES_BURNED and DISTANCE_WALKING_RUNNING which were granted but not saved.
await Health().hasPermissions(_types);
Expected behavior
Only the specified permissions should be requested.
Actual behavior
TOTAL_CALORIES_BURNED and DISTANCE_WALKING_RUNNING are requested even if not specified.
Flutter doctor
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.6.1 23G93 darwin-arm64, locale en-SE)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.93.1)
[✓] Connected device (5 available)
[✓] Network resources
• No issues found!
Additional information
According to the data types table, DISTANCE_WALKING_RUNNING isn't even supported on Android, but it's still requested. Why?
The text was updated successfully, but these errors were encountered:
On the IOS the same issue await Health().hasPermissions([HealthDataType.BLOOD_GLUCOSE], permissions: [HealthDataAccess.WRITE]) always return false when in settings allowed. IOS 17.6.1 iPhone 13 mini
Device / Emulator and OS
Please complete the following information for each phone and/or emulator you're experiencing this bug on:
Describe the bug
When running Health().requestAuthorization with the types STEPS and WORKOUT only, the types TOTAL_CALORIES_BURNED and DISTANCE_WALKING_RUNNING are also requested. Since they are not specified in our list of types, Health().hasPermissions always returns false, prompting Health().requestAuthorization to run every time we want to access health data.
To Reproduce
Expected behavior
Only the specified permissions should be requested.
Actual behavior
TOTAL_CALORIES_BURNED and DISTANCE_WALKING_RUNNING are requested even if not specified.
Flutter doctor
Additional information
According to the data types table, DISTANCE_WALKING_RUNNING isn't even supported on Android, but it's still requested. Why?
The text was updated successfully, but these errors were encountered: