startMonitoringBeaconsInRegion 和 startRangingBeaconsInRegion 的区别在哪里
Where is the difference between startMonitoringBeaconsInRegion and startRangingBeaconsInRegion
我不明白 BeaconManager 中这两个方法的区别 class。
beaconManager.startMonitoringBeaconsInRegion(region)
beaconManager.startRangingBeaconsInRegion(region)
查看 Javadoc 似乎 startMonitoringBeaconsInRegion 只是查找与 Region 对象匹配的信标。另一方面,startRangingBeaconsInRegion 方法将查找与区域对象匹配的信标 并且 将通过 RangeNotifier 提供距离更新。
startMonitoringBeaconsInRegion: Tells the BeaconService to start looking for beacons that match the passed Region object.
startRangingBeaconsInRegion: Tells the BeaconService to start looking for beacons that match the passed Region object, and providing updates on the estimated mDistance every seconds while beacons in the Region are visible.
我不明白 BeaconManager 中这两个方法的区别 class。
beaconManager.startMonitoringBeaconsInRegion(region)
beaconManager.startRangingBeaconsInRegion(region)
查看 Javadoc 似乎 startMonitoringBeaconsInRegion 只是查找与 Region 对象匹配的信标。另一方面,startRangingBeaconsInRegion 方法将查找与区域对象匹配的信标 并且 将通过 RangeNotifier 提供距离更新。
startMonitoringBeaconsInRegion: Tells the BeaconService to start looking for beacons that match the passed Region object.
startRangingBeaconsInRegion: Tells the BeaconService to start looking for beacons that match the passed Region object, and providing updates on the estimated mDistance every seconds while beacons in the Region are visible.