I don't seem to really understand the difference between the MonitoringListener and the RangingListener.
In my particular use case I would like to constantly know all beacons within range, and would like to know when a region associated with any of them is exited.
This is a snippet of what I'm talking about:
beaconManager.setRangingListener(new BeaconManager.RangingListener() {
@Override
public void onBeaconsDiscovered(Region region, final List<Beacon> beacons) {
}
});
beaconManager.setMonitoringListener(new BeaconManager.MonitoringListener() {
@Override
public void onEnteredRegion(Region region, List<Beacon> beacons) {
}
@Override
public void onExitedRegion(Region region) {
}
});
I don't really get the difference between the onBeaconsDiscovered and onEnteredRegion methods. When you start listening for any one of them you pass a Region as a parameter, so that confuses me a little bit more, since at first glance I assumed the first one was just constantly searching while the other one just looked for a specific Region.
Thanks!