Skip to content

Typo in AndroidManifest.xml blocks READ_HEALTH_DATA_HISTORY permission #58

@andresv17

Description

@andresv17

Description: The application cannot access historical data (older than 30 days) because the permission declared in the manifest does not match the official Android Health Connect namespace.

The Bug: In android/app/src/main/AndroidManifest.xml (approx line 9), the permission is declared as:

<uses-permission android:name="android.permission.PERMISSION_READ_HEALTH_DATA_HISTORY"/>

According to the official Android Health Connect documentation https://developer.android.com/health-and-fitness/health-connect/data-types?hl=es-419&jetpack=alpha10plus, the correct permission name requires the .health namespace:

<uses-permission android:name="android.permission.health.READ_HEALTH_DATA_HISTORY"/>

Impact: Since the app declares a non-existent permission (PERMISSION_READ...), the Android system does not recognize the request for the correct permission (health.READ...).
Also, attempts to grant it via ADB fail with java.lang.IllegalArgumentException: Unknown permission, leaving users stuck with the default 30-day window.

Recommended Fix: Update the permission string in the manifest to android.permission.health.READ_HEALTH_DATA_HISTORY.
I did it, compiled the app and now I can sync historic data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions