Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data.beacons returning empty array, facing issue in Android only, getting Distance & Proximity in iOS. #272

Open
akankshaingle opened this issue May 16, 2024 · 1 comment

Comments

@akankshaingle
Copy link

I'm facing issue in Android only, getting Distance & Proximity in iOS.
I'm using "Locate Beacon" app on android device to transmit signal.

here is my code:

        try {
            Beacons.detectIBeacons();
            Beacons.detectAltBeacons();
            Beacons.detectEstimotes();
            Beacons.detectEddystoneUID();
            Beacons.detectEddystoneTLM();
            Beacons.detectEddystoneURL();

            Beacons.startRangingBeaconsInRegion(region.identifier, region.uuid)
                .then(() => console.log('232 Beacon startRangingBeaconsInRegion started successfully', region))
                .catch(error => console.log('24 Error startRangingBeaconsInRegion: ', error));

        } catch (err) {
            console.log(`Beacons ranging not started, error: ${err}`)
        }
        
                // Ranging: Listen for beacon changes
    this.beaconsDidRangeEvent = Beacons.BeaconsEventEmitter.addListener(
        'beaconsDidRange',
        data => {
            console.log('beaconsDidRange, data: ', data);

        },
    );

    // monitoring events
    this.regionDidEnterEvent = Beacons.BeaconsEventEmitter.addListener(
        'regionDidEnter',
        ({ uuid, identifier }) => {
            console.log('regionDidEnter, data: ', { uuid, identifier });


        },
    );

    this.regionDidExitEvent = Beacons.BeaconsEventEmitter.addListener(
        'regionDidExit',
        ({ identifier, uuid, minor, major }) => {
            this.setState({ message: 'regionDidExit event' });
            console.log('regionDidExit, data: ', {
                identifier,
                uuid,
                minor,
                major,
            });

        },
    );

Already tried -
Beacons.startRangingBeaconsInRegion(region)
Beacons.startRangingBeaconsInRegion('Estimotes')

Screenshot 2024-05-16 at 12 34 11 PM
Screenshot 2024-05-16 at 12 34 25 PM
Screenshot 2024-05-16 at 12 34 59 PM

@akankshaingle
Copy link
Author

UPDATE- Solution
#125 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant