Class Location

    • Field Detail

      • CREATOR

        public static final android.os.Parcelable.Creator<Location> CREATOR
    • Method Detail

      • isIndoor

        public boolean isIndoor()
        Return true if the location is indoor
        See Also:
        isOutdoor()
      • getDeviceId

        public java.lang.String getDeviceId()
        Returns the device identifier that has generated the location
      • isOutdoor

        public boolean isOutdoor()
        Return true if the location is outdoor
        See Also:
        isIndoor()
      • getCoordinate

        public Coordinate getCoordinate()
        Return the coordinate of the location
      • getCartesianCoordinate

        public CartesianCoordinate getCartesianCoordinate()
        Only used in indoor. Return the cartesian coordinate in the corresponding floor of the building image.
      • getBuildingIdentifier

        public java.lang.String getBuildingIdentifier()
        Only used in indoor. Return the building identifier.
        Specified by:
        getBuildingIdentifier in interface BuildingResource
      • getFloorIdentifier

        public java.lang.String getFloorIdentifier()
        Only used in indoor. Return the floor identifier.
        Specified by:
        getFloorIdentifier in interface FloorResource
      • getQuality

        public Location.Quality getQuality()
        Only used in indoor. Return an indicative of quality calculated with accuracy and building size.
      • getTime

        public long getTime()
        Return the timestamp of the location.
      • getAccuracy

        public float getAccuracy()
        Return the accuracy radius (in meters)
      • getCartesianBearing

        public Angle getCartesianBearing()
        Only used in indoor. Return the bearing with respect to the building, being 0 the west-east axis. If hasCartesianBearing() is false the bearing returned couldn't be reliable. You can get the bearing quality with getBearingQuality()
      • getBearing

        public Angle getBearing()
        Return the bearing (in degrees) with respect to the Earth North. If hasBearing() is false it will return a default Angle
      • hasPitch

        public boolean hasPitch()
        Only used in indoor. Return true if the location has pitch, false otherwise.
        See Also:
        getPitch()
      • getPitch

        public Angle getPitch()
        Only used in indoor. Return the pitch with respect to the horizon, being 0 perfectly horizontal. If hasPitch() is false the pitch returned could not be reliable.
      • hasRoll

        public boolean hasRoll()
        Only used in indoor. Return true if the location has roll, false otherwise.
        See Also:
        getRoll()
      • getRoll

        public Angle getRoll()
        Only used in indoor. Return the roll with respect to the horizon, being 0 perfectly horizontal. If hasRoll() is false the roll returned could not be reliable.
      • hasRotationMatrix

        public java.lang.Boolean hasRotationMatrix()
        Return true if the location has a valid rotation matrix, false otherwise.
      • getRotationMatrix

        public float[] getRotationMatrix()
        Return the rotation matrix. If hasRotationMatrix() is false the rotation matrix returned could not be reliable.
      • getProvider

        public java.lang.String getProvider()
      • getCustomFields

        public java.util.Map<java.lang.String,​java.lang.String> getCustomFields()
        Returns map of custom fields, indexed by their name.
        Returns:
        Unmodifiable Map<String, String>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • describeContents

        public int describeContents()
        Specified by:
        describeContents in interface android.os.Parcelable
      • writeToParcel

        public void writeToParcel​(android.os.Parcel dest,
                                  int flags)
        Specified by:
        writeToParcel in interface android.os.Parcelable
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toMap

        public java.util.Map<java.lang.String,​java.lang.Object> toMap()
        Description copied from interface: MapperInterface
        Method to transform object into Map
        Specified by:
        toMap in interface MapperInterface
        Returns:
        Map with the information of the object mapped