问题
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