Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 Android 信标库来扫描信标。我设置了这个:
mBeaconManager.setBackgroundBetweenScanPeriod(2000);
但是扫描周期有一段时间是10000ms,有时是2000ms。
还有其他我必须实现的代码吗?
谢谢你。
如果您在绑定服务后更改扫描周期,您还必须调用updateScanPeriods()。像这样:
updateScanPeriods()
mBeaconManager.setBackgroundBetweenScanPeriod(2000); mBeaconMaanger.updateScanPeriods()