如何使用 GPS 在用户回来时发出通知
我想为我的 Android 用户创建一个提醒系统。 当用户设置提醒并离开某个点时,我希望我的服务在他接近该点返回时(假设超过 5 分钟后)向他发送通知。
我可以创建一个服务,继续监听 GPS 更新,并在与标记点的距离小于 100 米时发出通知,但我担心它会很快耗尽电池。此外,我不能真正依赖网络定位的准确性。
有更好的方法吗?我听说 foursquare 刚刚实施了一个这样的系统,但我不知道它是否有效,
谢谢你的帮助
I want to create a reminder system for my android user.
When the user set the reminder and leave a point, I would like my service to cast him a notification when he come back near this point (let's say more than 5 minutes later).
I can create a service which keep on listening gps updates and cast a notification when the distance with the marked point is smaller than 100 meters but I am affraid it would empty the battery very fast. Furthermore, I can not really rely on Network Localization accuracy.
Is there a better way to do that ? I have heard that foursquare have just implemented a such system but I do not know if it works
thanks for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加 接近警报
至于电池消耗:
Add a proximity alert using addProximityAlert()
As for the battery drain :