android - 如何设置android接近警报的准确性

标签 android proximity

我想知道每次触发的接近警报的准确性。有什么办法可以得到这些信息吗?我可以使用 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/

相关文章:

java - java中模拟/数字数据的使用

android - 确定 Android 手机与已知点的接近度,同时节省电量

android - 当您收到来自 addProximityAlert 的响应时,您如何知道您收到的是哪个设置?

regex - Elasticsearch中多词短语的接近度

android - 根据android中按钮点击的持续时间触发不同的方法

java - 在textView中一一显示ArrayList中的值

android - 如果您受邀分享 Google Play Android 开发者控制台,那么如何将应用程序添加到向您发送邀请的管理员控制台。?

java - 简单的 Android 方法崩溃..为什么?

android - iBeacon 可以区分 1 厘米和 10 厘米吗?

android - 无法解析 : fragment after adding navigation