Reputation: 57
According to https://developer.android.com/guide/topics/connectivity/bluetooth/permissions
There are need to grant permission manually to handle bluetooth for android 12 (API level > 30)
uses-permission android:name="android.permission.BLUETOOTH_SCAN"
uses-permission android:name="android.permission.BLUETOOTH_CONNECT"
But according to https://reactnative.dev/docs/0.62/permissionsandroid
These two PermissionsAndroid in RN 0.62 are not available and only available for RN ^0.66 causing error permission is null.
Is there any solution to use these permission in RN 0.62?
Upvotes: 0
Views: 6746
Reputation: 700
I've had similar issues with bluetooth permissions and Android 12+.
I solved it by asking permissions for BLUETOOTH_SCAN. Here's my full answer
Upvotes: 0
Reputation: 1135
There are one way to go around it....
Or....... Upgrade your entire app to latest react native version (I recently upgraded my two projects from react native 0.63 to latest and it was pure chaos and pain :) - nah just exaggerating, it feels so great to have your apps on latest version)
Upvotes: 1