UserActivityInfo

public data final class UserActivityInfo


Represents an update from Passive tracking.

Provides DataPoint s associated with the Passive tracking, in addition to data related to the user's UserActivityState.

Summary

Public fields

final @Nullable ExerciseType

The ExerciseType of the user for a UserActivityState.USER_ACTIVITY_EXERCISE state, and null for other UserActivityState s.

final @NonNull Instant

The time at which the current state took effect.

final @NonNull UserActivityState

The UserActivityState of the user from Passive tracking.

Public constructors

UserActivityInfo(
    @NonNull UserActivityState userActivityState,
    @Nullable ExerciseType exerciseType,
    @NonNull Instant stateChangeTime
)

Public methods

int
void
writeToParcel(@NonNull Parcel dest, int flags)

Public fields

exerciseType

@Nullable
public final @Nullable ExerciseType exerciseType

The ExerciseType of the user for a UserActivityState.USER_ACTIVITY_EXERCISE state, and null for other UserActivityState s.

stateChangeTime

@NonNull
public final @NonNull Instant stateChangeTime

The time at which the current state took effect.

userActivityState

@NonNull
public final @NonNull UserActivityState userActivityState

The UserActivityState of the user from Passive tracking.

Public constructors

UserActivityInfo

public final UserActivityInfo(
    @NonNull UserActivityState userActivityState,
    @Nullable ExerciseType exerciseType,
    @NonNull Instant stateChangeTime
)

Public methods

describeContents

@NonNull
public int describeContents()

writeToParcel

@NonNull
public void writeToParcel(@NonNull Parcel dest, int flags)