Class CustomConstraint

  • All Implemented Interfaces:
    android.os.Parcelable

    public class CustomConstraint
    extends java.lang.Object
    implements android.os.Parcelable
    Represents a constraint that can be applied to the NEON Location Service to improve location. This constraint is marked with a timestamp (Unix Time Ms according to the Android phone), A latitude/longitude position, an ErrorModel that specifies how this constraint should be applied in 2D, and elevation info that specifies how this constraint should apply in 3D/Elevation. Convenience methods in the NEON Constraint API will let you create User Check-in, GPS, and Ranging models, so start there first.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface android.os.Parcelable

        android.os.Parcelable.ClassLoaderCreator<T extends java.lang.Object>, android.os.Parcelable.Creator<T extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static android.os.Parcelable.Creator<CustomConstraint> CREATOR
      Used for sending data across binders
      ElevationInfo Elevation
      Represents the elevation information for this constraint
      ErrorModel ErrorModel
      Represents the error model for this constraint
      double Latitude
      WGS-84 Latitude
      double Longitude
      WGS-84 Longitude
      • Fields inherited from interface android.os.Parcelable

        CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
    • Constructor Summary

      Constructors 
      Constructor Description
      CustomConstraint​(long unixTimeMs, double latitude, double longitude, ErrorModel errorModel, ElevationInfo elevation)
      Creates a custom constraint
    • Field Detail

      • Latitude

        public final double Latitude
        WGS-84 Latitude
      • Longitude

        public final double Longitude
        WGS-84 Longitude
      • ErrorModel

        public final ErrorModel ErrorModel
        Represents the error model for this constraint
        See Also:
        ErrorModel
      • Elevation

        public final ElevationInfo Elevation
        Represents the elevation information for this constraint
        See Also:
        ElevationInfo
      • CREATOR

        public static final android.os.Parcelable.Creator<CustomConstraint> CREATOR
        Used for sending data across binders
    • Constructor Detail

      • CustomConstraint

        public CustomConstraint​(long unixTimeMs,
                                double latitude,
                                double longitude,
                                ErrorModel errorModel,
                                ElevationInfo elevation)
        Creates a custom constraint
        Parameters:
        unixTimeMs - Unix time in ms (to apply at the current time, pass System.currentTimeMillis())
        latitude - WGS-84 Latitude
        longitude - WGS-84 Longitude
        errorModel - Error model for this constraint
        elevation - Elevation information
    • Method Detail

      • getTimeUTCMillis

        public long getTimeUTCMillis()
        Retrieves the timestamp of this constraint. This value is directly comparable with System.currentTimeMillis()
        Returns:
      • getElapsedRealtimeMillis

        public long getElapsedRealtimeMillis()
        Retrieves the timestamp of this constraint. This value is directly comparable with SystemClock.elapsedRealTime()
        Returns:
      • 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
      • toString

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