ActivityTransitionEvent

public class ActivityTransitionEvent extends Object
implements Parcelable

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

Inherited Constant Summary

Field Summary

public static final Creator<ActivityTransitionEvent> CREATOR

Public Constructor Summary

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

Public Method Summary

boolean
equals(Object object)
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(Parcel dest, int flags)

Inherited Method Summary

Fields

public static final Creator<ActivityTransitionEvent> CREATOR

Public Constructors

public ActivityTransitionEvent (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 boolean equals (Object object)

public int getActivityType ()

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

public long getElapsedRealTimeNanos ()

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 int getTransitionType ()

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

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel dest, int flags)