If I need to monitor a specific region of the UUID.
Declaring in a region, but when entering didEnterRegion, I only get UUID and Major and Minor as null, would I need to do didRangeBeaconsInRegion to find just the defined region without finding another unwanted region?
I define the region as follows:
Region region = new Region ("region", Identifier.parse ("UUID"), null, null);
Another question, does the library find beacons by location?
Thank you very much, Regards
public void onBeaconServiceConnect() {
beaconManager.addMonitorNotifier(new MonitorNotifier() {
@Override
public void didEnterRegion(Region region) {
Log.i(TAG, " enter region");
try {
beaconManager.startRangingBeaconsInRegion(region);
Log.i(TAG, "region beacon" + region.getId1() + " " + region.getId2() + " " + region.getId3());
} catch (RemoteException e) {
e.printStackTrace();
}
}
@Override
public void didExitRegion(Region region) {
Log.i(TAG, "I no longer see an beacon");
try {
beaconManager.stopRangingBeaconsInRegion(region);
} catch (RemoteException e) {
e.printStackTrace();
}
}
@Override
public void didDetermineStateForRegion(int state, Region region) {
Log.i(TAG, "I have just switched from seeing/not seeing beacons: "+ state);
}
});
try {
beaconManager.startMonitoringBeaconsInRegion(new
Region("myMonitoringUniqueId", Identifier.parse("UUID"), null, null));
} catch (RemoteException e) {
}
}