java.lang.Object | |
↳ | com.google.android.gms.location.LocationResult |
A data class representing a geographic location result from the fused location provider.
All locations returned by getLocations()
are guaranteed to have a valid latitude,
longitude, and UTC timestamp. On API level 17 or later they are also guaranteed to have
elapsed real-time since boot. All other parameters are optional.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a
LocationResult for the given locations. | |||||||||||
Extracts the
LocationResult from an Intent. | |||||||||||
Returns the most recent location available in this result, or null if no locations
are available.
| |||||||||||
Returns locations computed, ordered from oldest to newest.
| |||||||||||
Returns true if an Intent contains a
LocationResult . | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Parameters | |
---|---|
other |
Object
|
Returns | |
---|---|
boolean |
Extracts the LocationResult
from an Intent.
This is a utility function which extracts the LocationResult
from the extras of an Intent that was sent from the fused location provider.
Parameters | |
---|---|
intent |
Intent
|
Returns | |
---|---|
LocationResult |
a LocationResult , or null if the Intent doesn't contain a result.
|
Returns the most recent location available in this result, or null if no locations are available.
Returns | |
---|---|
Location |
Returns locations computed, ordered from oldest to newest.
No duplicate locations will be returned to any given listener (i.e. locations will not overlap in time between subsequent calls to a listener).
Returns | |
---|---|
List<Location> |
Returns true if an Intent contains a LocationResult
.
This is a utility function that can be called from inside an intent receiver to make sure the received intent is from the fused location provider.
Parameters | |
---|---|
intent |
Intent
|
Returns | |
---|---|
boolean |
true if the intent contains a LocationResult , false
otherwise.
|
Returns | |
---|---|
int |
Returns | |
---|---|
String |
Parameters | |
---|---|
parcel |
Parcel
|
flags |
int
|