Get horizontal and vertical accuracy on your Android device

I am developing a location tracking application in android. When

public void onLocationChanged(Location location) { System.out.println(location); } so it gives meLocation[mProvider=network,mTime=1302690466456,mLatitude=21.1596426,mLongitude=72.8072426 ,mHasAltitude=false,mAltitude=0.0,mHasSpeed=false,mSpeed=0.0,mHasBearing=false,mBearing=0.0 ,mHasAccuracy=true,mAccuracy=75.0,mExtras=Bundle[mParcelledData.dataSize=148]] 

I want to get horizontal and vertical accuracy. How to get these 2 values โ€‹โ€‹.. Thanks in advance

+4
source share
3 answers

No vertical or horizontal accuracy. Accuracy applies to the position in general.

0
source

It took 8 years 3 months. You may have found a solution. This can help others, such as myself, who seek help in obtaining horizontal and vertical accuracy.

Android Location documentation says that

  • getAccuracy () Get the approximate horizontal accuracy of this location, radial, in meters.
  • getVerticalAccuracyMeters () Get the approximate vertical accuracy of this location in meters.
  • You can find all the services and features related to the location at the following link operated by Android

https://developer.android.com/reference/android/location/Location

=======

0
source

You can get horizontal accuracy by reading it.

http://developer.android.com/reference/android/location/LocationProvider.html

Returns a constant describing the horizontal precision of this provider. If the supplier returns a finer grain or exact location, ACCURACY_FINE is returned, otherwise if the location is approximate, ACCURACY_COARSE is returned.

-1
source

Source: https://habr.com/ru/post/1347897/


All Articles