문제

I am developing an app where I require to alert user if he move more than 20 meters from his checking location. I am planning to use proximity sensor for this development. However I found this document.

http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html

It says

"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."

If I use GPS distance it will take considerable power utilization. Am I developing on wrong path? Appriciate your kind sugesstions.

도움이 되었습니까?

해결책

For your task the only way is using GPS in best quality mode (CLLocationAcuracyBest).
Check loaction.getAcuracy() to see if the location came from GPS or cell Tower/wifi.

다른 팁

Hi You can use GPS based on your needs. It will surely take some more power consumption but works with more accurately.Please be more specific how many times you need this function within app.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top