android locationManager请求位置更新
有没有办法在特定区间向 locationManager 请求位置更新并忽略 minDistance?我已经尝试过,
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 3600 * 1000, 1, this)
但在日志中有时会出现位置在几分钟内更新,有时在半小时内更新...可以这样做以固定间隔更新位置并忽略距离吗?
Is there a way to request location updates from a locationManager at specific intervan and to ignore minDistance? I've tried
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 3600 * 1000, 1, this)
But in logs appears sometimes that location is updated in a few minutes, sometimes in a half of hour... Can this be done to update location at a fixed interval and to ignore distance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用此架构。创建新的 Runnable ,每次您需要时都会调用它
You can use this schema. Create new Runnable which will be called every time, when you want it