Skip to content

[Health, 12.0.1] Can't read ACTIVE_ENERGY_BURNED in Android #1151

@tihomir-trifono

Description

@tihomir-trifono

Plugin Name

health

Plugin Version

12.0.1

Device

Samsung A55 and Pixel 7

Operating System

Android

Describe the bug

I have active energy data in Health Connect, but it can't be read in Flutter app. The permission for
ACTIVE_ENERGY_BURNED is added.

With some configuration on iOS, I can read active energy.

Steps to Reproduce

  var typesAndroid = [
    HealthDataType.ACTIVE_ENERGY_BURNED,
    HealthDataType.BASAL_ENERGY_BURNED,
  ];


List<HealthDataPoint> healthData = await Health().getHealthDataFromTypes(
  types: types,
  startTime: DateTime.now().subtract(const Duration(days: 7)),
  endTime: DateTime.now(),
);

Expected Behavior

Read data for active energy

Actual Behavior

No data for active energy

Flutter Logs

Screenshots

No response

Flutter Doctor Output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.0, on macOS 15.3.1 24D70 darwin-arm64, locale en-BG)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] Connected device (4 available)
[✓] Network resources

Additional Information

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions