Delen via


Windows.ApplicationModel.UserActivities Namespace

A User Activity encapsulates a user task that can be continued at a later time, and potentially on a different device.

For example, a mail app could create a User Activity when the user starts creating a new email message. The user could pause working on the email and start working on it again later on the same machine, or resume the activity of writing the email on another device.

The APIs in this namespace allow developers to:

  • Create User Activities
  • Provide a cross-platform context for User Activities.
  • Start and stop Activities

See Continue user activity, even across devices for more information about how to use User Activities with Windows Timeline to help users resume what they were doing on their PC, and across devices.

Classes

UserActivity

A UserActivity is created by an app during its execution to notify the system of a user work stream that can be continued on another device, or at another time on the same device. It provides information about a task the user is engaged in.

Note

Starting in July 2021, users who have activity history synced across their Windows devices through their Microsoft Account (MSA) will no longer have the option to upload new activity in Timeline. They'll still be able to use Timeline and see their activity history (information about recent apps, websites and files) on their local PC. AAD-connected accounts won't be impacted.

UserActivityAttribution

Provides graphical information about a user activity. Overrides information the system provides about the user activity.

UserActivityChannel

Creates or gets UserActivity objects created on this or another device.

UserActivityContentInfo

Represents the content metadata of this activity in JSON format.

UserActivityRequest

Passed as an argument to the UserActivityRequestManager.UserActivityRequested event. Used to return a UserActivity to the caller.

UserActivityRequestedEventArgs

Passed to the UserActivityRequestManager.UserActivityRequested event. Allows the handler of the event to pass back a UserActivity.

UserActivityRequestManager

Handle external requests to create a UserActivity.

UserActivitySession

Tracks a UserActivity while the user is engaged in that activity.

UserActivitySessionHistoryItem

Provides the start and end time that a user was engaged in a particular activity.

UserActivityVisualElements

Contains information, such as the description and icon, that can be shown in the details tile for a UserActivity.

Interfaces

IUserActivityContentInfo

Represents the content metadata of this activity in JSON format.

Enums

UserActivityState

Defines the states of a UserActivity.

See also