[英]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
. 我已经在我的应用程序中集成了
AltBeacon
库,它在Oreo
以外的所有android
版本中都能正常运行。
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. 当我检查代码时,发现
becaon
扫描的代码在服务中,因此我们需要处理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. 因为
Altbeacon
库正在使用服务进行扫描。
Please let me know is there any way to fix this issue or please suggest any other libraries for beacon
scanning. 请让我知道有什么方法可以解决此问题,或者建议其他任何用于
beacon
扫描的库。
Thanks 谢谢
Library version 2.12 introduced a new scanning mechanism compatible with Android 8 power saving restrictions. 库版本2.12引入了与Android 8省电限制兼容的新扫描机制。 Apps that use the library will need to upgrade to version 2.12+ in order to detect in the background on Android 8 devices.
使用该库的应用将需要升级到2.12+版本,以便在Android 8设备上在后台进行检测。 Version 2.13+ adds further enhancements for Android 8.1 restrictions of scanning with the screen off.
2.13+版为Android 8.1的关闭屏幕扫描限制添加了更多增强功能。
You can read more about the Android 8 restrictions here: Beacon Detection With Android 8 您可以在此处阅读有关Android 8限制的更多信息: 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+. 如果您使用最新版本,则该库将使用JobScheduler而不是长期运行的服务来处理对Android 8+上安装的应用程序的扫描。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.