react-native-alt-beacon
react-native-alt-beacon copied to clipboard
Ranging: Array of beacons is empty
When ranging for beacons, the array of beacons (last line in the code excerpt from RNABeacon.java below) is always empty. I tested with the exact same BeaconLayout and Configuration in a small Android dummy app. There the array has data and I can successfully range the beacons.
To test the package I added two more events (see the code excerpt below) . The new events didServiceConnect and didRangeBeaconsInRegionEnter do get called, but because the array is zero didFoundBeacons is never called, but didNotFoundBeacons is called instead.
Any thoughts?
private BeaconConsumer rangingConsumer = new BeaconConsumer() {
@Override
public void onBeaconServiceConnect() {
sendEvent(context, "didServiceConnect", null);
beaconManager.setRangeNotifier(new RangeNotifier() {
@Override
public void didRangeBeaconsInRegion(Collection<Beacon> beacons, Region region) {
sendEvent(context, "didRangeBeaconsInRegionEnter", null);
WritableMap map = new WritableNativeMap();
map.putString("uuid", region.getUniqueId());
if (beacons.size() > 0) {
Are you matching the same region UUID?
Yes, I was using the correct UUID. I did these tests almost two months ago and now testing your current version. See #4
I now tried your example app. It unfortunately doesn't show any beacons when ranging as before. It is the correct UUID and other beacon detection apps, show the beacons on the same phone.
So I believe your implementation just doesn't work with Kontakt.io beacons yet..
Any update on this? I'm always getting "didNotFoundBeacons" .