Skip to content

GET_RECORD_FAIL - permission problem only in production app #13

@Fudal

Description

@Fudal

When I'm using:

    final result = await HealthConnectFactory.getRecord(
      type: type,
      startTime: DateTime(2000),
      endTime: DateTime.now(),
    );

I have error:

PlatformException(GET_RECORD_FAIL, com.package.name lacks the following permissions: [android.permission.health.READ_BLOOD_PRESSURE], java.lang.SecurityException: com.package.name lacks the following permissions: [android.permission.health.READ_BLOOD_PRESSURE]
	at androidx.health.platform.client.impl.error.ErrorStatusConverterKt.toException(ErrorStatusConverter.kt:47)
	at androidx.health.platform.client.impl.ReadDataRangeCallback.onError(ReadDataRangeCallback.kt:35)
	at androidx.health.platform.client.service.IReadDataRangeCallback$Stub.onTransact(IReadDataRangeCallback.java:75)
	at android.os.Binder.execTransactInternal(Binder.java:1331)
	at android.os.Binder.execTransact(Binder.java:1268)
, null)

but that error is only in production app.

Of course my app has permissions in androidManifest:


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

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