StasDoskalenko / react-native-google-fit

A React Native bridge module for interacting with Google Fit
MIT License
333 stars 209 forks source link

isAvailable() doesn't work on Android 11+ without change to AndroidManifest.xml #324

Closed rblakesley closed 1 year ago

rblakesley commented 1 year ago

Very nice module – thanks! It's perhaps worth mentioning in the documentation that, from Android 11 onwards, you need to add this to AndroidManifest.xml, otherwise the isAvailable() function will always return false:

    <queries>
      <package android:name="com.google.android.apps.fitness" />
    </queries>

See https://developer.android.com/training/package-visibility/declaring for more information.

aboveyunhai commented 1 year ago

@rblakesley we did. https://github.com/StasDoskalenko/react-native-google-fit#android-11