我正在开发一个应用程序,如果他从他的检查位置移动超过 20 米,我需要提醒用户。我打算为此开发使用接近传感器。但是我找到了这份文件。
它说
"The specific threshold distances are determined by the hardware and the location technologies that are currently available. For example, if Wi-Fi is disabled, region monitoring is significantly less accurate. However, for testing purposes, you can assume that the minimum distance is approximately 200 meters."
如果我使用 GPS 距离,它会消耗大量电量。我在错误的道路上发展吗?感谢您的建议。
最佳答案
对于您的任务,唯一的方法是以最佳质量模式 (CLLocationAcuracyBest
) 使用 GPS。
检查 loaction.getAcuracy() 以查看位置是否来自 GPS 或手机信号塔/wifi。
关于iphone - iOS接近度和GPS测量距离,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15940996/