react-native-beacons-manager
react-native-beacons-manager copied to clipboard
Fork that works up to RN 69.7
We have recently forked this library to push the required changes need for this library to work with later versions up to 0.69.7.
We have also dealt with the changes needed for the library to work with Android 12. It also works for iOS.
NOTE - We have specifically only tested this for ranging.
Our Fork: Here
For those targeting Android 12+ you need to update your permissions to the following:
Now instead of BLUETOOTH
and BLUETOOTH_ADMIN
we now only need BLUETOOTH_SCAN
.
So your permission for Bluetooth in you Android Manifest should look like:
<!-- Replace both of these -->
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<!-- -->
<!-- With this -->
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
<!-- -->
NOTE - You also need to change the required permissions in manifest for this library to the above. Again you only need BLUETOOTH_SCAN in the library manifest. You can update this yourself or use our fork above.
If you aren't already you also need to ask for both ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION.
See permissions changes here: Android 12 Changes
If you are updating your own library, permission changes alone will not work for Android. You need to change the Altbeacon library version to 2.19.4 at least as done here: https://github.com/MacKentoch/react-native-beacons-manager/pull/237
Is that work on IOS? I have a problem that requestWhenInUseAuthorization is null and can't scan in ios
Hi @Jake-Young ,
Do you have the running code as I m not able to make it work
@Jake-Young @gigflex @duylinhdang1998 Are you able to scan the iBeacons using this library? If yes could you please share your code or help me in fixing https://github.com/MacKentoch/react-native-beacons-manager/issues/266.