Skip to content

[health: 12.1.0] activity = Walking ; should call writeWorkoutData & writeHealthData(steps)? but duplicate entry by google fit #1196

Open
@gitabcxyz

Description

@gitabcxyz

Plugin Name

health

Plugin Version

12.1.0

Device

pixel 4

Operating System

android 11

Describe the bug

if an user wants to add that "walking 60 minutes of 7000 steps". if we call writeWorkoutData(), we can only store the calories and distance but not steps. So i also call writeHealthData(..unit: HealthDataUnit.COUNT,type: HealthDataType.STEPS,..). But when i fetch the activities from health i see one STEPS record from app and a duplicate STEPS record from google fit (source: com.google.android.apps.fitness). what am i doing wrong.

Steps to Reproduce

create workout and healthdata for '60 minutes walking of 7000 steps'.

Expected Behavior

steps healthdata duplication should be avoided by our app and google fit app.

Actual Behavior

i create on workoutdata and one healthdata, but google fit is also creating a duplicate healthdata for steps.

Flutter Logs

Screenshots

No response

Flutter Doctor Output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.3, on macOS 15.4.1 24E263 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.98.2)
[✓] Connected device (6 available)
[✓] Network resources

• No issues found!

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions