没能获得在地理围栏警报 [英] not able to get alert in geofencing

查看:229
本文介绍了没能获得在地理围栏警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经运行地理栅栏的样本,我已经分配了两个组纬度,经度和半径并运行示例。当我点击了注册地理围栏我得到下面的东西在我的日志

I have run a sample of Geofence and I have assigned two set of Lat , Lng and radius and run the sample. When I tap over register geofence I am getting following things in my log

Location Services is available
Client connected
Add Geofences: Success GeofenceRequestIds=[1, 2]
com.example.android.geofence.ACTION_GEOFENCES_ADDED

但在此之后没有任何反应,我不知道是什么问题,我通过启用GPS,但没有效果通过了目前的位置。

but nothing happens after that, I don't know what the issue I am passed the current location by enabling gps but no effect.

我不知道什么时候我会得到通知时,围栏划线,以测试它,我已经通过了在击剑同一地理坐标,但仍然没有提醒我得到。

I don't know when I am gonna get the notification when a fence is crossed, to test it I have passed the same geo coordinates that are in fencing but still no alerts I am getting.

我都试过,甚至替换的getService() getBroadcast() createRequestPendingIntent 读线程数超过计算器功能后,但没有运气。

I have tried even replacing getService() by getBroadcast() inside createRequestPendingIntent function after reading few threads over stackoverflow , but no luck.

我也试图与

**Geofence #1 and Geofence #2**

Lat : 23.039568000000003
Lng : 72.56600400000002
Radius :1

和我还设置genymotion以上共同坐标我现在的位置,使其工作,但没有通知。

and I have also set my current position in genymotion to above co ordinates to make it work but no notification.

即使在一个真实的设备我的3G是启用和我一起移动的设备,但没有改变为止。

Even on a real device my 3G is enable and I am moving with the device but no change so far.

推荐答案

嘿一次检查访问到我的位置是否处于选中状态。即设置 - >位置访问

Hey once check whether access to my location is selected. Ie in setting -> Location access

这篇关于没能获得在地理围栏警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆