public class

ActivityTransitionEvent

extends Object
implements Parcelable
java.lang.Object
   ↳ com.google.android.gms.location.ActivityTransitionEvent

Class Overview

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

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<ActivityTransitionEvent> CREATOR
Public Constructors
ActivityTransitionEvent(int activityType, int transitionType, long elapsedRealtimeNanos)
Creates an activity transition event.
Public Methods
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 hashCode()
String toString()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<ActivityTransitionEvent> CREATOR

Public Constructors

public ActivityTransitionEvent (int activityType, int transitionType, long elapsedRealtimeNanos)

Creates an activity transition event.

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

Public Methods

public boolean equals (Object object)

Parameters
object Object
Returns
boolean

public int getActivityType ()

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

Returns
int

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.

Returns
long

public int getTransitionType ()

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

Returns
int

public int hashCode ()

Returns
int

public String toString ()

Returns
String

public void writeToParcel (Parcel dest, int flags)

Parameters
dest Parcel
flags int