Open GiacomoMasi opened 5 years ago
I also have this problem. No error message whatsoever.
@GiacomoMasi @rhyek do you find solution for this issue ? As i am facing the same situation
@Hassam34, look at #154.
I have the same problem, android.
my code:
const region = Platform.select({
ios: {
identifier: 'nameid',
uuid: 'uuid'
},
android: {
regionId: 'nameid',
beaconsUUID: 'uuid',
}
})
console.log('choice ', region)
// Request for authorization while the app is open
// Tells the library to detect iBeacons
Beacons.detectIBeacons()
// Start detecting all iBeacons in the nearby
try {
await Beacons.startRangingBeaconsInRegion(region)
console.log(`Beacons ranging started succesfully!`)
} catch(err) {
console.log(`Beacons ranging not started, error: `, err)
}
// Print a log of the detected iBeacons (1 per second)
DeviceEventEmitter.addListener('beaconsDidRange', (data) => {
console.log('Found beacons!', data.beacons)
})
Version
1.0.7
Platform
iOS | Android
OS version
iOS 10| android 7.0...
Steps to reproduce
I have this code in the ComponentDidMount:
componentDidMount() { Beacons.detectIBeacons(); const uuid = this.state.uuidRef; Beacons.startRangingBeaconsInRegion('REGION1', uuid) .then(() => console.log('Beacons ranging started succesfully')) .catch(error => console.log('Beacons ranging not started, error: ${error}'), ); }
Expected behavior
The application scans all beacons in the area.
Actual behavior
When I run the project, the app is installed on the device but when the app is launced, in a few seconds it is closed, I don't understand why.