My android app shows an alert when a user enters a region, and another alert when the user exits a region. There are three separate regions with one beacon each. The enter events are triggered very fast when you come into range of a beacon. However, the exit events seem to have a delay of at least 15 seconds.
I understand that there is a default delay to protect from false positive exit events, so I used beaconManager.setBackgroundScanPeriod(15000,1000), and beaconManager.setRegionExitExpiration(1000), (note: I am passing java Longs for the time as required) however there is still a delay of about 15 seconds after exiting a region before the alert is displayed.
Am I doing something wrong, or is it not possible to trigger the onExitedRegion function any faster?
Hi,
I can confirm - we have a bug here in recent SDK versions. It forces SDK to always use default 20s timeout before triggering onExitEvent.
We working hard to solve the issue. Fix should be available in upcoming SDK version - stay tuned
[...]
// Set the monitoring settings.
beaconManager.setBackgroundScanPeriod(1000, 0);
// Set the exit expiration to it's min (between 1000 and 60000 in ms).
beaconManager.setRegionExitExpiration(1000);
[...]
I think what you wrote is wrong, because:
the setForegroundScanPeriod() is used for ranging (see the JavaDoc),
and setRegionExitExpiration is for monitoringonExitRegion call.
OK, so you want to change the scanning period of the ConfigurableDevice scanner, don’t you?
The doc’ doesn’t seems to demonstrate how to do this…
Just to @Wojciech_Wawerek, the monitoring setRegionExitExpiration is working well on 1.0.13
if you say, that setRegionExitExpiration is for monitoring onExitRegion call.
Why is onEddystoneFound invoked although the beacon has no power supply (batteries are removed) and put out the namespace and instance of the beacon (Eddystone), so I can be sure, that is the beacon I had on my desk.