Is there a limit to the radius of a geofence in Android?

戏子无情 提交于 2019-12-11 02:30:06

问题


I develop an application that uses the Android Geofence API. Now I have the problem that, when the radius of the geofence is as large as 10 kilometers, it does not work, but when it is as small as 10 meters, then it works.

In the documentation, Google does not say much about the radius:

Android Sample

Geofence API

Geofence Builder API

Thank you very much!


回答1:


The radius determines how large or small the circle is that is drawn around the geopoint. There is not a maximum limit for the size of the radius, however what I have found is that the entry or exit off a fence requires triggering to happen, so with larger (10 km) maybe you're not triggering the entry or exit.

You mention that 10 meters works, have you tried 100? 1000? I would test with increasing size and make sure you're logging your information as you test so you can determine if you are actually triggering the fence.



来源:https://stackoverflow.com/questions/23250344/is-there-a-limit-to-the-radius-of-a-geofence-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!