androidgoogle-mapskotlinlocationfusedlocationproviderclient

How accuarated is coarse location?


So, my app depends on users to be in a certain area, lets say 2km by radius, I was using GPS with high accuarcy to determine if the users were inside this radius, but for some reason, some users are experimenting delays on the loading screen doing the GPS needs to be warmed and get the signal, sometimes this leads to infinite loading screen or 30 - 40 seconds loading.

So I need to come up with a solution and what I have done is to remove the HIGH_ACCUARCY from my locationprovider and added the LOW_BATTERY provider, which from what I have read it will use network location (with coarse location) or GPS if needed.

So I have done this

  locationCallback = LocationCallback()
        locationRequest = LocationRequest.create()
        locationRequest.interval = 10000
        locationRequest.fastestInterval = 2000
        locationRequest.priority = LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY

Now, I want to know how fine this location is, I mean, for a 2km radius , is there a way that the user latitude and longitude could be outside thi radius by any chance if the user is inside ?

I want to know if this given location with this other network provider is not that bad, because I need at least 1 or 2 blocks away of difference from my current location as best.

So, is a networks (coarse location) good for this use case? does it have a lot of difference between where I'am and whats the latitude and longitude it gives ?

thanks a lot !


Solution

  • From the reference:

    public static final int PRIORITY_BALANCED_POWER_ACCURACY

    Used with setPriority(int) to request "block" level accuracy.

    Block level accuracy is considered to be about 100 meter accuracy. Using a coarse > accuracy such as this often consumes less power.

    So 100 meters accuracy. Should be fine for in your case.