matinzd/react-native-health-connect

revokeAllPermissions in not work on Android

CohesionJamesTsao opened this issue · 6 comments

I followed all the settings in the document and other functions can be used normally.
But only the revokeAllPermissions function has no effect in Android 14
But in Android 13, it has normal removal permissions.

Environment:

  • Health Connect Version: 2.0.3
  • React Native Version: 0.71.16
  • New architecture enabled: Yes/No
  • Using Expo: No

import { initialize, requestPermission, getGrantedPermissions, readRecords, revokeAllPermissions, getSdkStatus, SdkAvailabilityStatus } from 'react-native-health-connect';

<TouchableOpacity style={styles.button} onPress={revokeAllPermissions}> <Text style={styles.text}>revokePermissions</Text> </TouchableOpacity>

I noticed this as well,
What happened on my end though is that when i close the app after revoking app permissions,
the permissions on the health connect were revoked. but only after I closed the app

If i don't close the app (not only simply putting it on the background), the permission changes don't seem to reflect

Same here - couldn't get this function to work

This function hasn't been changed for a while and it can be due to changes from Google. So, expect these behaviours in alpha version.
I will try to narrow down the issue when I find some time.

Finally I got some time to check this out!

This can be related to permission delegate API not being fully compatible with RN. Can everyone verify closing and opening the app would show the changes?