public class Location extends java.lang.Object implements FloorResource
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 <any> |
CREATOR |
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
boolean |
equals(java.lang.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.
|
java.lang.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
|
java.lang.String |
getDeviceId()
Returns the device identifier that has generated the location
|
java.lang.String |
getFloorIdentifier()
Only used in indoor.
|
Point |
getPosition()
Return the position of the location.
|
java.lang.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
|
java.lang.String |
toString() |
void |
writeToParcel(Parcel dest,
int flags) |
public Point getPosition()
Point object.
It's better to use directly getCoordinate(), getCartesianCoordinate(), etc. on
the Location objectpublic boolean isIndoor()
isOutdoor()public java.lang.String getDeviceId()
public boolean isOutdoor()
isIndoor()public Coordinate getCoordinate()
public CartesianCoordinate getCartesianCoordinate()
public java.lang.String getBuildingIdentifier()
getBuildingIdentifier in interface BuildingResourcepublic java.lang.String getFloorIdentifier()
getFloorIdentifier in interface FloorResourcepublic 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 java.lang.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.HIGHpublic java.lang.String toString()
toString in class java.lang.Objectpublic int describeContents()
public void writeToParcel(Parcel dest,
int flags)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object