FusedLocationApi Performance Issue: Accuracy seems capped at 10.0 meters
Asked Answered
C

1

2

I'm experiencing a strange problem where the FusedLocationProviderAPI does not give me a better Accuracy number then 10.0 meters. It starts like normal giving me a high number of, for example, 56 meters... 24... 13... and then stays at 10.0. Seemingly capped at giving no better then that.

Tried on Phone Sony Xperia Z2 & Huawei Honor 8

location.getAccuracy() //Seems capped at 10.0 meters

The strange part is that I was receiving an Accuracy number down to around 3.0 meters with good weather outside and I have no memory of changing the phones GPS options / nor any options related to the GPS Service Class.

My app is dependant on being able to get the highest accuracy number possible. What could be the issue here? The Phone itself? The settings of the request? Possible reasons of the capped number?

Edit: Experienced the same problem when trying on the Huwaei. So there seems to be an issue with the code? Like after x amount of location requests accuracy gets capped at 10.0 from system??

Relevant things from my GPS service:

Manifest

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />

Service

private long UPDATE_INTERVAL = 2 * 1000;  /* 10 secs */
private long FASTEST_INTERVAL = 2000; /* 2 sec */
static final int MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION = 1;

private void requestLocation() {
    locationRequest = new LocationRequest();
    locationRequest.setInterval(UPDATE_INTERVAL);
    locationRequest.setFastestInterval(FASTEST_INTERVAL);
    locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
    gac = new GoogleApiClient.Builder(this)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addApi(LocationServices.API)
            .build();
}

@Override
public void onLocationChanged(Location location) {

    locationData = location; //1. Set local field to incoming location
    gpsAccuracy = location.getAccuracy(); //2. Est. horizontal accuracy of location, radial, in meters.
}
Chaussure answered 1/3, 2018 at 7:34 Comment(14)
I have been experiencing the same issue, despite using Cordova to get the accuracy. Out of the blue, now it is capped at 10m. Did you find out why?Homology
@Mirko Hi Mirko, No unfortunately i have not found any answers anywhere... Atleast there is now one more person that has experienced the same issue as me. I honestly think there are more people experiencing the same thing as us... but they are simply not calling location.getAccuracy(). Could we ask google developers about this? Or what can we do?Chaussure
I am posting a question as well, will link this. It is a new thing I guess, our app used to have no problems for the past year so it must be a recent change somewhere.Homology
@Mirko You might find this interesing: After doing a software reset on the phone and reinstalling the app i was getting accuracy numbers below 10 again... initialy. But again after x amount of location updates the accuracy number is limited to 10.0m. I should say that my GPS is designed to run as foreground for up to maybe 3.5 hours at a time. The only correlation i have seen is time and amount of requests as a triggering factor.Chaussure
I am able to get 3/4 meters using this plugin, version 2.x. Try to have a look at the Java code github.com/mauron85/cordova-plugin-background-geolocation/tree/…Homology
I linked your question here #49348989Homology
@Mirko Thanks for your attention and help MirkoChaussure
Could you try to do one more test? When you reset the device, do not update Google Play Services (use the stock version) and try to get some location data to see if you get below 10. Then update the Google Play Services and try again.Homology
@Mirko Yes i will try this and try what the other guy said in your question. I will give you the results tomorrow :)Chaussure
Let us continue this discussion in chat.Homology
More questions popping up, see #49656801Homology
I've had the same problem reported at #49289706. I have tried several different versions of Play Services. The demo app I link to is telling -- it's clear GPS only can get better accuracy on the same device at the same moment.Nexus
I have the same issue and created an issue with Google, issuetracker.google.com/u/1/issues/79189573, and a reproducible test case in their samples, github.com/googlesamples/android-play-location/issues/151. Hopefully we will here something soon.Chapple
I answered a similar question here #49348989Homology
L
0

It looks like 10 m is the best approx accuracy you can get with FusedLocationServicesApi, with HIGH_ACCURACY as the priority. However, I believe it might be possible to get better accuracy by using LocationManager. Check out this article: http://www.tothenew.com/blog/googles-fused-location-api-for-android/

Lucilla answered 29/6, 2018 at 1:19 Comment(1)
The issue was internal with Google. After updating Play Services it is now possible to get better accuracy again.Chaussure

© 2022 - 2024 — McMap. All rights reserved.