As @davidgyoung suggested in Detect beacons exited a range, here my new question.
I would like to create a radius around beacons for entering and leaving that zone. In fact detecting beacons by distance. I understood how to check, when a beacon entered a radius. To test this I used:
public void didRangeBeaconsInRegion(Collection<Beacon> beacons, Region region) { if (beacons.size() > 0) { for (Beacon beacon: beacons) { logToDisplay("Beacon "+beacon.toString()+" is about "+beacon.getDistance()+" meters away, with Rssi: "+beacon.getRssi()); if (beacon.getDistance() < 5.0) { logToDisplay("Beacon "+ beacon.toString()+" I see a beacon that is less than 5 meters away."); } } } }
I did not understand, how to recognize the exit of a range. Please help.