I am working on an Android app which makes use of geofence. I want user to decide the radius of geofence. But I want to know what is the minimum and maximum radius for the geofence so that app will work fine.
Maximum- the radius of the earth. GPS is confirmed not to work on the moon.
Minimum- depends on the accuracy of your gps hardware, atmospheric conditions, etc. If everything is great, probably 10 meters reliably. If you fall back to network location, probably about 500 meters.
For best results, the minimum radius of the geofence should be set between 100 - 150 meters.
=> When Wi-Fi is available location accuracy is usually between 20 - 50 meters.
=> When indoor location is available, the accuracy range can be as small as 5 meters. Unless you know indoor location is available inside the geofence, assume that Wi-Fi location accuracy is about 50 meters.
Check and read developer site
https://developer.android.com/training/location/geofencing.html
You can set 50-100 meters as minimum for all conditions.
The documentation doesn't actually specify a minimum or maximum but while investigating some issues I found that geofences that are smaller than 80m radius seem to be added as 80m at least on my device. I found that out using:
adb shell
dumpsys activity service com.google.android.gms/com.google.android.location.internal.GoogleLocationManagerService
That said, it's seems a little inconsistent because they sometimes trigger an exit while I am well within the 80m - almost at the edge of the 30m that was the original geofence but other times it works differently. The adb
command still shows 80m.
Maximum- the radius of the earth. GPS is confirmed not to work on the moon.
Minimum- depends on the accuracy of your gps hardware, atmospheric conditions, etc. If everything is great, probably 10 meters reliably. If you fall back to network location, probably about 500 meters.
© 2022 - 2024 — McMap. All rights reserved.