我想知道每次触发的接近警报的准确性。有什么办法可以得到这些信息吗?我可以使用 locationManager.getLastKnownLocation() 吗?如果准确性不好,有什么办法可以告诉系统不要触发警报?
最佳答案
I want to know the accuracy for the every fired proximity alert. Is there any way to get that information?
在您的 LocationListener
上调用的每个更新都会为新事件传递一个 Location
对象。此对象具有诸如 getAccuracy()
之类的方法,您可以使用它们来获取该信息。
Is there any way to tell the system not to fire alerts if the accuracy is bad?
LocationManager.requestLocationUpdates()
,只允许您根据每次更新之间的时间间隔或距离控制更新频率。它不允许您根据准确性控制从管理器获取更新;您将需要使用更新中的信息来决定是否保留每份报告。
关于android - 如何设置android接近警报的准确性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13501509/