gaijin
gaijin

Reputation: 21

Altbeacon is not scanning on Android 7

We have found cases where logcat shows that our app which uses altbeacon does not do scanning on several devices which are all using Android 7 (Oppo F5, Xiaomi 4X, Infinix Zero 5). At that time we let setEnableScheduledScanJobs to default which is true for Android 8+ and false for Android 7 and earlier. After not knowing what to do, we tried making setEnableScheduledScanJobs true on Android 7, and it then did scan and found beacons.

What is happening here? We would like to understand the reason, so as not to do hit and run only to fail again later scanning beacons on Android 7 and other (especially) older Androids.

When I read this and this, it pertains to code running in the background. We only do scanning in the foreground, so what is written in these two should not be relevant, but is it?

Upvotes: 2

Views: 88

Answers (1)

davidgyoung
davidgyoung

Reputation: 64916

There is no known reason that foreground scans on the Android 7 devices you mention should not work.

It's hard to say what is wrong without seeing your code, but the most likely explanation is a problem with the specific implementation in the app. An easy way to find if this is true is to install and test the library reference app as-is (modifying the beacon parser as needed if working with iBeacon, Eddystone, or another specific beacon type.) If you find that the reference app works but your app does not, then the issue is with the specific implementation. Look for differences between your code and the reference app code to find the issue.

Upvotes: 0

Related Questions