I want to know the accuracy for the every fired proximity alert. Is there any way to get that information? can I use locationManager.getLastKnownLocation()? Is there any way to tell the system not to fire alerts if the accuracy is bad?
I want to know the accuracy for the every fired proximity alert. Is there any way to get that information?
Every update called on your LocationListener
is passed a Location
object for the new event. This object has methods like getAccuracy()
that you can use to obtain that information.
Is there any way to tell the system not to fire alerts if the accuracy is bad?
LocationManager.requestLocationUpdates()
, only allows you to control the frequency of updates based on time between or distance between each update. It does not allow you to control getting updates from the manager based on accuracy; you will need to use the information from the update to decide whether or not to keep each report.