I have a strange problem when the FusedLocationProviderAPI does not give me the best accuracy number, and then 10.0 meters. It starts as usual, giving me a large number, for example, 56 meters ... 24 ... 13 ... and then stays at 10.0. It seemed like it was no better than that.
I tried on the phone Sony Xperia Z2 and Huawei Honor 8
location.getAccuracy()
The strange part is that I got the Accuracy number up to about 3.0 meters with good weather on the street, and I have no memory about changing the settings of the GPS phone / nor any parameters related to the GPS service class.
My application depends on the ability to get the highest possible number. What could be here? The phone itself? Request settings? Possible reasons for the limited number?
Edit: Experienced the same problem while trying on Huwaei. So what seems to be a problem with the code? As well as after the number of x location requests will be limited to 10.0 from the 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; private long FASTEST_INTERVAL = 2000; 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;
source share