I experience an issue and can reproduce it on different devices with different Android OS. I get the expected behaviour with iBeacon scanning for the first time. When I scan the next time I get no Beacons. The result list in delegate is empty. I printed a count on the setRangeNotifier with the size of the beacons but apparently after it only shows the beacons size to be 1 for the first time after which it continually displays a 0.
beaconManager.setRangeNotifier(new RangeNotifier() {
@Override
public void didRangeBeaconsInRegion(final Collection<Beacon> beacons, Region region) {
Log.d("Beacons count",beacons.size());
}
});
Output: Beacons Count 1 Beacons Count 0 Beacons Count 0 Beacons Count 0
My ranging period and scanning period is as below
beaconManager.setBackgroundScanPeriod(1000l);
beaconManager.setBackgroundBetweenScanPeriod(31000l);