public final class LocationResult
extends java.lang.Object
implements android.os.Parcelable
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<LocationResult> |
CREATOR |
static java.lang.String |
EXTRA_LOCATION_RESULT |
| Modifier | Constructor and Description |
|---|---|
protected |
LocationResult(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
static LocationResult |
create(java.util.List<android.location.Location> locations)
Creates a
LocationResult for the given locations. |
int |
describeContents() |
boolean |
equals(java.lang.Object o)
Two instances of
LocationResult are considered to be equal if they have the same
number of locations and the timestamp on each location matches the timestamp of its counterpart
in the other instance. |
static LocationResult |
extractResult(android.content.Intent intent)
Extracts the
LocationResult from an Intent. |
android.location.Location |
getLastLocation()
Returns the most recent location available in this result, or null if no locations are
available.
|
java.util.List<android.location.Location> |
getLocations()
Returns locations computed, ordered from oldest to newest.
|
int |
hashCode() |
static boolean |
hasResult(android.content.Intent intent)
Returns true if an
Intent contains a LocationResult. |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final java.lang.String EXTRA_LOCATION_RESULT
public static final android.os.Parcelable.Creator<LocationResult> CREATOR
public static LocationResult create(java.util.List<android.location.Location> locations)
LocationResult for the given locations.public java.util.List<android.location.Location> getLocations()
public android.location.Location getLastLocation()
public static boolean hasResult(android.content.Intent intent)
Intent contains a LocationResult.true if the Intent contains a LocationResult, false
otherwise.public static LocationResult extractResult(android.content.Intent intent)
LocationResult from an Intent.LocationResult, or null if the Intent doesn't contain a
result.public boolean equals(java.lang.Object o)
LocationResult are considered to be equal if they have the same
number of locations and the timestamp on each location matches the timestamp of its counterpart
in the other instance.equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelablepublic int describeContents()
describeContents in interface android.os.Parcelable