fuchsia.ui.activity

Added: 7

PROTOCOLS

Listener

Defined in fuchsia.ui.activity/provider.fidl

The Listener protocol subscribes to changes in the system's activity state. Clients which care about the activity state of the system are expected to implement this protocol and subscribe via Provider.WatchState.

OnStateChanged

Callback that is invoked whenever the system state changes. The Listener is expected to acknowledge each call explicitly and will not receive new state until this acknowledgement is done.

Request

NameType
state State
transition_time zx/Time

Response

<EMPTY>

Provider

Defined in fuchsia.ui.activity/provider.fidl

The Provider protocol offers a subscription interface through which clients can watch for changes in the system's activity state.

WatchState

Subscribe to changes in the system's state. The server will always invoke listener.OnStateChanged at least once with the initial state, and after that invoke listener.OnStateChanged whenever the system's state changes.

Request

NameType
listener Listener

ENUMS

State strict

Type: uint32

Defined in fuchsia.ui.activity/state.fidl

State is an enumeration of the activity states the system may be in.

NameValueDescription
0
1

IDLE implies that the system is not currently being used by a user. In other words, the system is not ACTIVE.

2

ACTIVE implies that a user has recently or is currently using the system.

Activity can be signalled by discrete interactions (cursor, keyboard, touchscreen), or by ongoing activities (video playback).

The specific meaning of "recently" is an implementation detail of the Activity Service, but a typical value is 15 minutes.

TABLES

GenericActivity

Defined in fuchsia.ui.activity/activity.fidl

GenericActivity is a user or system activity of unspecified type, e.g. a keyboard press or an alarm going off.

OrdinalFieldTypeDescription
label string

Brief human-readable label for the activity, for logging/debugging. e.g. "cursor", "key", "video"

UNIONS

DiscreteActivity flexible

Defined in fuchsia.ui.activity/activity.fidl

DiscreteActivity is an activity which occurs at a point in time.

OrdinalVariantTypeDescription
generic GenericActivity

Activities that require no special handling.

OngoingActivity flexible

Defined in fuchsia.ui.activity/activity.fidl

OngoingActivity is an activity which has a definite start and end time.

OrdinalVariantTypeDescription
generic GenericActivity

Activities that require no special handling.

ALIASES

NameValueDescription
OngoingActivityId uint32