react-native-beacons-manager
react-native-beacons-manager copied to clipboard
App crashes
Version
1.0.7
Platform
Android
OS version
Android 9
Steps to reproduce
- Fresh RN project - npx react-native init AwesomeProject
Expected behavior
It should show the beacons and not close the app.
Actual behavior
I have this piece of code in a component
componentDidMount() {
Beacons.detectIBeacons();
Beacons
.startRangingBeaconsInRegion('some id', '7b44b47b-52a1-5381-90c2-f09b6838c5d4') // or like < v1.0.7: .startRangingBeaconsInRegion(identifier, uuid)
.then(() => console.log('Beacons ranging started succesfully'))
.catch(error => console.log(`Beacons ranging not started, error: ${error}`));
}
And the app closes (crashes).
Hi @mishkeTz, I have resolved the crash with the following code: const region = Platform.select({ ios: { identifier: 'region', uuid: 'YOUR_BEACON_UDID' }, android: { regionId: 'region', beaconsUUID: 'YOUR_BEACON_UDID', } })
But I am getting the error: uniqueid may not be null
I had the same issue (dependency problem with rn), look at: #154
@Saumyadip-Pramanik I'm experiencing the same crash. How did setting your region
fix this? Also, what does your call to startRangingBeaconsInRegion
look like?
Hi all, i hav ethe same problem.... there is any solution?
i use expo 37.0.0 eject with react 0.61.5
but make a crash.... i try to follow every fix but nothing.....
Any solution ?? I tried this issue's solution: #154. But didn't work for me.
Hello team, I got the solution Please use for android Beacons.startRangingBeaconsInRegion('Estimotes', '8492E75F-4FD6-469D-B132-043FE94921D8')
instead of
const region = { identifier: 'Estimotes', uuid: '8492E75F-4FD6-469D-B132-043FE94921D8' }; await Beacons.startRangingBeaconsInRegion(region)