Android GPS proximity alert not working(Android GPS 接近警报不起作用)
问题描述
我正在尝试设置最基本的接近警报,但似乎没有任何反应.我对 Android 编程相当陌生,所以请让我知道我做错了什么或者我错过了什么.我从这里的一些源代码和 这个.这是我的代码:
I'm trying to set up the most basic proximity alert, but nothing seems to happen. I'm fairly new to Android programming, so please let me know what I'm doing wrong or what am I missing. I got inspired from some source codes out here and this one. Here's my code:
和接收者
推荐答案
这是我用来获取接近警报的服务,欢迎您使用它,它不需要清单中的接收者,只需要服务
This is the service that i use to get proximity alerts, your welcome to use it, it doesnt need the reciever in the manifest, just the service
您必须替换数据库查询和一些代码以适应您的应用程序,这是针对多个邻近警报,这就是 n 增加的原因.
you would have to replace the database query and some of the code to fit your app, this is for multiple proximity alerts thats why there is the increment of n.
这篇关于Android GPS 接近警报不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!