Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 1.25 KB

useractivity_tojson_1289546151.md

File metadata and controls

24 lines (17 loc) · 1.25 KB
-api-id -api-type
M:Windows.ApplicationModel.UserActivities.UserActivity.ToJson
winrt method

Windows.ApplicationModel.UserActivities.UserActivity.ToJson

-description

Serializes the UserActivity into a JSON string. Among other things, the JSON string will contain the App display name, the activation URL, the content URL, content information, and visual element information such as description, background color, and so on.

-returns

The JSON text representation of the UserActivity.

-remarks

A better re-engagement UI can be built within a consuming application if the source application can provide more details about the re-engagement. By serializing the UserActivity into a JSON string, you can then store it in a DataPackage and reconstitute it in the consuming application to provide more insight about the source application and the specific activity within the application that sourced the DataPackage.

-see-also

UserActivity.ToJsonArray, UserActivity.TryParseFromJson

-examples