简体   繁体   English

Android中的地理围栏半径是否有限制?

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

I develop an application that uses the Android Geofence API. 我开发了一个使用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. 现在我有一个问题,当地理围栏的半径大到10公里时,它不起作用,但是当它减小到10米时,它就起作用。

In the documentation, Google does not say much about the radius: 在文档中,Google没有详细说明半径:

Android Sample Android示例

Geofence API 地理围栏API

Geofence Builder API Geofence Builder API

Thank you very much! 非常感谢你!

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. 半径的大小没有最大限制,但是我发现,进入或离开栅栏需要触发才能发生,因此,对于较大的距离(10公里),您可能不会触发。

You mention that 10 meters works, have you tried 100? 您提到10米有效,您尝试过100米吗? 1000? 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. 我会随着大小的增加进行测试,并确保您在测试时记录了您的信息,以便可以确定您是否实际上在触发篱笆。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM