public class Location extends Object implements FloorResource, android.os.Parcelable
isIndoor()
and isOutdoor()
.
A valid indoor location has floorIdentifier and cartesianCoordinate.Modifier and Type | Class and Description |
---|---|
static class |
Location.Builder |
static class |
Location.Quality
The quality of the location/bearing.
|
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<Location> |
CREATOR |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(Object o) |
float |
getAccuracy()
Return the accuracy radius (in meters)
|
Angle |
getBearing()
Return the bearing (in degrees) with respect to the Earth North.
|
Location.Quality |
getBearingQuality()
Return the quality of the cartesian bearing.
|
String |
getBuildingIdentifier()
Only used in indoor.
|
Angle |
getCartesianBearing()
Only used in indoor.
|
CartesianCoordinate |
getCartesianCoordinate()
Only used in indoor.
|
Coordinate |
getCoordinate()
Return the coordinate of the location
|
String |
getFloorIdentifier()
Only used in indoor.
|
Point |
getPosition()
Return the position of the location.
|
String |
getProvider() |
Location.Quality |
getQuality()
Only used in indoor.
|
long |
getTime()
Return the timestamp of the location.
|
boolean |
hasBearing()
Return true if the location has bearing and the bearing quality is
Location.Quality.HIGH , false otherwise. |
boolean |
hasCartesianBearing()
Only used in indoor.
|
int |
hashCode() |
boolean |
isIndoor()
Return true if the location is indoor
|
boolean |
isOutdoor()
Return true if the location is outdoor
|
String |
toString() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<Location> CREATOR
public Point getPosition()
Point
object.
It's better to use directly getCoordinate()
, getCartesianCoordinate()
, etc. on
the Location
objectpublic boolean isIndoor()
isOutdoor()
public boolean isOutdoor()
isIndoor()
public Coordinate getCoordinate()
public CartesianCoordinate getCartesianCoordinate()
public String getBuildingIdentifier()
getBuildingIdentifier
in interface BuildingResource
public String getFloorIdentifier()
getFloorIdentifier
in interface FloorResource
public Location.Quality getQuality()
public long getTime()
public float getAccuracy()
public boolean hasCartesianBearing()
Location.Quality.HIGH
, false otherwise.getCartesianBearing()
,
getBearingQuality()
public Angle getCartesianBearing()
hasCartesianBearing()
is false the bearing returned couldn't be reliable. You can
get the bearing quality with getBearingQuality()
public boolean hasBearing()
Location.Quality.HIGH
, false otherwise.getBearing()
,
getBearingQuality()
public Angle getBearing()
hasBearing()
is false
it will return a default Anglepublic String getProvider()
public Location.Quality getBearingQuality()
Location.Quality.HIGH
. If the quality is Location.Quality.LOW
the bearing
is not reliable. If the location is outdoor and the bearing is set the quality will be Location.Quality.HIGH
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable