1. An application calls [UIAbility.onShare()](../reference/apis/js-apis-app-ability-uiAbility.md#onshare), a lifecycle callback provided by the UIAbility component, to set the data to share. In this lifecycle callback, **ohos.extra.param.key.contentTitle** indicates the title of the content to share in the sharing box, **ohos.extra.param.key.shareAbstract** provides an abstract description of the content, and **ohos.extra.param.key.shareUrl** indicates the online address of the service. You need to set these three items as objects, with the key set to **title**, **abstract**, and **url**, respectively.
2. A system dialog box calls [abilityManager.acquireShareData()](../reference/apis/js-apis-app-ability-abilityManager.md#acquiresharedata) to obtain data shared through atomic service sharing. Specifically, the system finds the UIAbility based on the mission ID and calls the **OnShare()** lifecycle of the UIAbility to obtain the shared data.
# @ohos.app.ability.MediaControlExtensionAbility (ExtensionAbility for Media Playback Control)
The **MediaControlExtensionAbility** module, inherited from [UIExtensionAbility](js-apis-app-ability-uiExtensionAbility.md), provides ExtensionAbilities for media playback control. No APIs are added. During actual development, you need to implement the APIs in the parent class to use the lifecycle and capabilities of UIExtensionAbilities. You cannot directly call the base class.
> - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The APIs of this module can be used only in the stage model.
> - The APIs provided by this module are system APIs.
# MediaControlExtensionContext (ExtensionAbility Context for Media Playback Control)
**MediaControlExtensionContext**, inherited from [UIExtensionContext](js-apis-inner-application-uiExtensionContext.md), provides the context environment for [MediaControlExtensionAbility](js-apis-app-ability-MediaControlExtensionAbility.md). It provides MediaControlExtensionAbility-related configuration and APIs for operating the MediaControlExtensionAbility. For example, you can use the APIs to start a MediaControlExtensionAbility.
> - The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The APIs of this module can be used only in the stage model.
> - The APIs provided by this module are system APIs.
-[@ohos.app.ability.UIExtensionAbility (Base Class for ExtensionAbilities with UI)](reference/apis/js-apis-app-ability-uiExtensionAbility.md)
-[@ohos.app.ability.UIExtensionContentSession (UI Operation Class for ExtensionAbilities with UI)](reference/apis/js-apis-app-ability-uiExtensionContentSession.md)
-[@ohos.app.ability.MediaControlExtensionAbility (ExtensionAbility for Media Playback Control)](reference/apis/js-apis-app-ability-MediaControlExtensionAbility.md)
-[MediaControlExtensionContext (ExtensionAbility Context for Media Playback Control)](reference/apis/js-apis-inner-application-MediaControlExtensionContext.md)