ActivityTransitionEvent

public classActivityTransitionEventextendsObject
implementsParcelable

Represents an activity transition event, for example start to walk, stop running etc.

Inherited Constant Summary

Field Summary

public static finalCreator<ActivityTransitionEvent> CREATOR

Public Constructor Summary

ActivityTransitionEvent(int activityType, int transitionType, long elapsedRealtimeNanos)
Creates an activity transition event.

Public Method Summary

boolean
equals(Objectobject)
int
getActivityType()
Gets the type of the activity of this transition.
long
getElapsedRealTimeNanos()
Gets the elapsed realtime when this transition happened.
int
getTransitionType()
Gets the type of the transition.
int
String
void
writeToParcel(Parceldest, int flags)

Inherited Method Summary

Fields

public static finalCreator<ActivityTransitionEvent> CREATOR

Public Constructors

publicActivityTransitionEvent(int activityType, int transitionType, long elapsedRealtimeNanos)

Creates an activity transition event.

Parameters
activityType the type of the activity of this transition
transitionType the type of transition
elapsedRealtimeNanos the elapsed realtime when this transition happened

Public Methods

public booleanequals(Objectobject)

public intgetActivityType()

Gets the type of the activity of this transition. It's one of activity types defined inDetectedActivity.

public longgetElapsedRealTimeNanos()

Gets the elapsed realtime when this transition happened. Note that the event may happen in the past which means this timestamp may be much smaller than the current time.

public intgetTransitionType()

Gets the type of the transition. It's one of the transition types defined in ActivityTransition.

public inthashCode()

publicStringtoString()

public voidwriteToParcel(Parceldest, int flags)