报警定位为Android?

编程入门 行业动态 更新时间:2024-10-10 01:19:51
本文介绍了报警定位为Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在开始我的应用程序,一些POI坐标将被添加到了Android系统。几小时后,我的应用程序被关闭,用户走到靠近POI他应得到通知,例如之一通过一个状态消息。

是this正确的方法对我的情况?有没有在Android中使用更多的东西来实现这一目标?

  

公共无效addProximityAlert(双   纬度,经度双,浮法   半径长的到期,PendingIntent   意图)

解决方案

是的,你可以使用 LocationManager 和 addProximityAlert()为基础,您所需的功能。

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)

解决方案

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

更多推荐

报警定位为Android?

本文发布于:2023-11-27 11:02:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637803.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!