0

I have updated the altbeacon-library and I'm currently using 2.13.1. I have been doing some basic tests to adapt the application to work in Android Oreo and I'm not getting the expected behaviour with the library. The ScanJob is launched every 15 minutes aproximately when the app is not in foreground, but I'm seeing this message every time:

"We are inside a beacon region.  We will not scan between cycles"

I have tried to set different uuids in two beacons to try to trigger more scans, but I understand looking and the ScanJob code, that once you enter any region, you don't scan anymore until you exit all of them and reenter one. Is that correct? Could the scan take in account different regions so we can get more frequent scan cycles?

Eylen
  • 2,617
  • 4
  • 27
  • 42

1 Answers1

2

The Android Beacon Library running in the background on Android 8+ will do a software scan for beacons every ~15 minutes with default settings. This is unaffected by region status. Any scanned beacons will result in the appropriate callbacks to didEnterRegion, didExitRegion or didRangeBeacobsIbRegion.

It's hard to say what problem you are experiencing without seeing the setup code, the callback definitions, and knowing the beacons active during test. But if you do not see it working as described above, something is wrong.

The log line shown in the question simply indicates that a beacon has recently been seen, so a hardware bluetooth filter to look for a newly appearing beacon between software scan cycles cannot be used. If no beacons are present, the library will use such a filter for very rapid first detections. But it will not work for second detections, which fall back to the background scan cycle as described above.

davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • Another question... in iOS the limit of beacons scan can be "removed" by usign different UUIDS. I understand from your answer and the docs in your site that this doesn't apply for Android, right? – Eylen Mar 22 '18 at 10:24
  • 1
    Correct. There are a number of reasons the Android Beacon Library does not have this UUID-specific fast triggering feature like iOS. One big reason is that it tends to fail on iOS af hardware slots run out and the behavior becomes unpredictable. – davidgyoung Mar 22 '18 at 13:46
  • could you check please this question? Migrating to Android O is becoming a nightmare for us... https://stackoverflow.com/questions/49429755/scanjob-continues-beign-invoked-after-the-15-min-period-and-stops-when-a-region – Eylen Mar 22 '18 at 15:10