react-native-beacons-manager icon indicating copy to clipboard operation
react-native-beacons-manager copied to clipboard

beacon detection issue

Open SingothuSrinu opened this issue 8 months ago • 2 comments

Version

latest

Platform

Android

OS version

13 android

Steps to reproduce

Expected behavior

After getting 1st beacon data if we approach 2nd beacon it has to detect 2nd beacon and get data from beacon

Actual behavior

when ever app is launch, app detects 1st beacon( navigate and come back to initial screen) and we approach to second beacon scanning is stop

const region = { identifier: 'NAME', uuid: '*********16digit code ******', };

        if (Platform.OS === 'android') {
            Beacons.setForegroundScanPeriod(1000);
            Beacons.startMonitoringForRegion(region)
            Beacons.startRangingBeaconsInRegion(region);
            this.beaconListner = Beacons.BeaconsEventEmitter.addListener(
                'beaconsDidRange',
                data => {
                    if (data?.beacons && data.beacons.length > 0) {
                         console.log('beacon data' + data.beacons);
                        this.validateBeacons(data);
                    } else console.log('else condition collision' + data.beacons.length);
                },
            );
        } 

SingothuSrinu avatar Oct 31 '23 07:10 SingothuSrinu

I am recommending to use https://github.com/JanSneeuw/react-native-beacon-radar

yasintz avatar Jan 06 '24 18:01 yasintz

@SingothuSrinu update org.altbeacon:android-beacon-library in react-native-beacons-manager/android/build.gradle to 2.20.1. But there are some incompatibilities with the values the new AltBeacon library version outputs. More work needed.

noway avatar Jan 11 '24 22:01 noway