简体   繁体   中英

Android Beacon library(AltBeacon) support in Oreo

I have integrated AltBeacon library in my app and it's working perfectly in all android versions except Oreo .

When I checked the code I found that the code for becaon scanning is in a service so we need to handle service restrictions from Oreo. Even after making the changes scanning is not happening in the specified time intervals, when the app is in background. Because Altbeacon library is using service for scanning.

Please let me know is there any way to fix this issue or please suggest any other libraries for beacon scanning.

Thanks

Library version 2.12 introduced a new scanning mechanism compatible with Android 8 power saving restrictions. Apps that use the library will need to upgrade to version 2.12+ in order to detect in the background on Android 8 devices. Version 2.13+ adds further enhancements for Android 8.1 restrictions of scanning with the screen off.

You can read more about the Android 8 restrictions here: Beacon Detection With Android 8

If you use the latest version, the library will use a JobScheduler instead of a long-running service to process scans on apps installed on Android 8+.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM