Package fi.moprim.tmd.sdk.model
Interface TmdActivity
-
- All Superinterfaces:
android.os.Parcelable
public interface TmdActivity extends android.os.Parcelable
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetActivity()doublegetCo2()java.lang.StringgetDestination()doublegetDistance()doublegetDuration()java.lang.StringgetMetadata()The metadata annotated to the TMD activityjava.lang.StringgetOrigin()java.lang.StringgetPolyline()To decode the polyline, checkPolylineUtils.decode(String)doublegetSpeed()longgetTimestampEnd()longgetTimestampStart()VehicleProfilegetVehicleProfile()The vehicle profile associated to the TMD activitybooleanisCheckedByUser()static booleansameTmdActivities(TmdActivity first, TmdActivity second)
-
-
-
Method Detail
-
getTimestampStart
long getTimestampStart()
- Returns:
- the UTC timestamp (in ms) of the start of the TMD activity
-
getTimestampEnd
long getTimestampEnd()
- Returns:
- the UTC timestamp (in ms) of the end of the TMD activity
-
getDuration
double getDuration()
- Returns:
- the duration in seconds of the activity
-
getActivity
java.lang.String getActivity()
- Returns:
- the label of the activity
-
isCheckedByUser
boolean isCheckedByUser()
- Returns:
- true if the corrected label has been set by the user
-
getCo2
double getCo2()
- Returns:
- the amount of CO2 (in grams) generated during the activity.
-
getDistance
double getDistance()
- Returns:
- the distance in meters covered in the activity
-
getSpeed
double getSpeed()
- Returns:
- the average speed in kilometers per hours during the activity
-
getPolyline
java.lang.String getPolyline()
To decode the polyline, checkPolylineUtils.decode(String)- Returns:
- the encoded polyline of the GPS locations during the activity
-
getOrigin
java.lang.String getOrigin()
- Returns:
- the origin of the activity, or the location for the stationary activity
-
getDestination
java.lang.String getDestination()
- Returns:
- the destination of the activity, null for stationary
-
getMetadata
java.lang.String getMetadata()
The metadata annotated to the TMD activity- Returns:
- metadata annotated to the TMD activity, can be null
-
getVehicleProfile
VehicleProfile getVehicleProfile()
The vehicle profile associated to the TMD activity- Returns:
- vehicle profile associated to the TMD activity, can be null
-
sameTmdActivities
static boolean sameTmdActivities(@NonNull TmdActivity first, @NonNull TmdActivity second)
-
-