Android 的位置警报?

发布于 2024-10-04 04:51:41 字数 438 浏览 0 评论 0原文

启动我的应用程序时,应将几个 POI 坐标添加到 Android 系统中。几个小时后,我的应用程序关闭,用户走近其中一个 POI,他将收到通知,例如通过状态消息。

对于我的场景来说是正确的方法吗? Android 中是否还有更多功能可以实现这一目标?

公共无效addProximityAlert(双 纬度、双经度、浮动 半径、长过期时间、PendingIntent 意图)

When starting my app, several POI coordinates shall be added to the Android System. Some hours later, my app is closed and the user walks close to one of the POI he shall get notified e.g. through a status message.

Is this the right approach for my scenario? Are there more things available in Android to achieve this?

public void addProximityAlert (double
latitude, double longitude, float
radius, long expiration, PendingIntent
intent)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一城柳絮吹成雪 2024-10-11 04:51:41

是的,您可以使用 LocationManageraddProximityAlert() 作为您所需功能的基础。

Yes, you would use LocationManager and addProximityAlert() as the basis for your desired feature.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文