AltBeacon library BootstrapNotifier does not call didEnterRegion

混江龙づ霸主 提交于 2019-12-05 18:22:10

You can increase the frequency of background scans with the following code:

beaconManager.setBackgroundBetweenScanPeriod(0l);
beaconManager.setBackgroundScasnPeriod(1100l);

This will make the background detection times as fast as in the foreground. But be forewarned, this will make your app use lots of battery power. You can tweak the between scan period to your tolerance for battery drain. As you noted, the default is 5 minutes (5*3600l).

Android L has new scanning APIs which promise to help improve this tradeoff between detection timers and battery usage. But for4.3 and 4.4 apps, you need to make a judgment call.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!