Class CustomConstraint
- java.lang.Object
-
- com.trx.neon.api.neonConstraint.model.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.
-
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<CustomConstraint>
CREATOR
Used for sending data across bindersElevationInfo
Elevation
Represents the elevation information for this constraintErrorModel
ErrorModel
Represents the error model for this constraintdouble
Latitude
WGS-84 Latitudedouble
Longitude
WGS-84 Longitude
-
Constructor Summary
Constructors Constructor Description CustomConstraint(long unixTimeMs, double latitude, double longitude, ErrorModel errorModel, ElevationInfo elevation)
Creates a custom constraint
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
long
getElapsedRealtimeMillis()
Retrieves the timestamp of this constraint.long
getTimeUTCMillis()
Retrieves the timestamp of this constraint.java.lang.String
toString()
void
writeToParcel(android.os.Parcel dest, int flags)
-
-
-
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 Latitudelongitude
- WGS-84 LongitudeerrorModel
- Error model for this constraintelevation
- 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 interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-