为什么 FusedLocationProviderClient 中的 getAccuracy 方法总是返回最小值为 10.0(从不低于 10)?
mLocationRequest = new LocationRequest();
mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
mLocationRequest.setInterval(UPDATE_INTERVAL);
mLocationRequest.setFastestInterval(FASTEST_INTERVAL);
mLocationRequest.setSmallestDisplacement(0);
getFusedLocationProviderClient(getApplicationContext()).requestLocationUpdates(mLocationRequest, new LocationCallback() {
@Override
public void onLocationResult(LocationResult locationResult) {
// do work here
longFused=locationResult.getLastLocation().getLongitude();
latFused=locationResult.getLastLocation().getLatitude();
accFused=locationResult.getLastLocation().getAccuracy();
sendMessageToUI(longFused, latFused, accFused,locationResult.getLastLocation().getTime());
}
},
Looper.myLooper());
使用该代码,我总是得到 accFused 从未低于 10.0,有人可以帮忙吗?