android – FINE_ The accuracy of location is lower than that of course_ LOCATION

According to my understanding of accessing location on Android:

>The location provider requires access permission_ COARSE_ Location, the accuracy is low, but the speed of retrieving the location is faster. > the GPS provider needs access_ FINE_ Location, with higher accuracy and slower retrieval speed

So to better understand this, I ran the following code

//Go through a list of all location providers to get the "best" one
List<String> locationProviders = locationManager.getAllProviders();
for (String locationProviderInit : locationProviders) {
    Log.d(DEBUG_TAG, "found locationProvider:" + locationProviderInit);
    Location lastKNownLocation = locationManager.getLastKNownLocation(locationProviderInit);
    if (lastKNownLocation != null) {
        Log.d(DEBUG_TAG, "accuracy: " + lastKNownLocation.getAccuracy());
        Log.d(DEBUG_TAG, "time: " + lastKNownLocation.getTime());
    }
}

Although network location providers always give an accuracy of 60.0, GPS location providers usually provide lower accuracy. It takes longer

I don't know why

resolvent:

The accuracy measurement is in meters, so the lower value indicates the more accurate position. Therefore, the position accurate to 60.0 meters can deviate 60 meters in any direction, while the position accurate to 5.0 meters can only deviate 5 meters at most

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>