LocationCompat
Helper for accessing features in android.location.Location.
Properties
Link copied to clipboard
Constant used as a key to store bearing accuracy in getExtras for Android SDK levels below Oreo (26).
Link copied to clipboard
Constant used as a key to store mock location status in getExtras for Android SDK levels below JBMR2 (18).
Link copied to clipboard
Constant used as a key to store Mean Sea Level altitude in getExtras.
Link copied to clipboard
Constant used as a key to store Mean Sea Level altitude in getExtras.
Link copied to clipboard
Constant used as a key to store speed accuracy in getExtras for Android SDK levels below Oreo (26).
Link copied to clipboard
Constant used as a key to store vertical accuracy in getExtras for Android SDK levels below Oreo (26).
Functions
Link copied to clipboard
Get the estimated bearing accuracy of this location in degrees.
Link copied to clipboard
Return the time of this fix, in milliseconds of elapsed real-time since system boot.
Link copied to clipboard
Return the time of this fix, in nanoseconds of elapsed real-time since system boot.
Link copied to clipboard
Returns the estimated Mean Sea Level altitude accuracy in meters of the location at the 68th percentile confidence level.
Link copied to clipboard
Returns the Mean Sea Level altitude of the location in meters.
Link copied to clipboard
Get the estimated speed accuracy of this location in meters per second.
Link copied to clipboard
Get the estimated vertical accuracy of this location in meters.
Link copied to clipboard
Returns true if this location has a bearing accuracy.
Link copied to clipboard
Returns true if the location has a Mean Sea Level altitude, false otherwise.
Link copied to clipboard
Returns true if the location has a Mean Sea Level altitude accuracy, false otherwise.
Link copied to clipboard
Returns true if this location has a speed accuracy.
Link copied to clipboard
Returns true if this location has a vertical accuracy.
Link copied to clipboard
Removes the bearing accuracy from the location.
Link copied to clipboard
Removes the Mean Sea Level altitude from the location.
Link copied to clipboard
Removes the Mean Sea Level altitude accuracy from the location.
Link copied to clipboard
Removes the speed accuracy from the location.
Link copied to clipboard
Removes the vertical accuracy from the location.
Link copied to clipboard
Set the estimated bearing accuracy of this location in degrees.
Link copied to clipboard
open fun setMslAltitudeAccuracyMeters(@NonNull location: @NonNull Location, @FloatRange(from = 0.0) mslAltitudeAccuracyMeters: Float)
Sets the Mean Sea Level altitude accuracy of the location in meters.
Link copied to clipboard
Sets the Mean Sea Level altitude of the location in meters.
Link copied to clipboard
open fun setSpeedAccuracyMetersPerSecond(@NonNull location: @NonNull Location, speedAccuracyMps: Float)
Set the estimated speed accuracy of this location in meters per second.
Link copied to clipboard
Set the estimated vertical accuracy of this location in meters.