@ohos.app.ability.ActionExtensionAbility (ExtensionAbility for Custom Actions)

The ActionExtensionAbility module provides a template for you to implement custom actions. It inherits from UIExtensionAbility.

By implementing ActionExtensionAbility, you can provide content viewing and processing functionalities for other applications. For example, you can use ActionExtensionAbility to implement a text translation feature. Other applications can then call this ActionExtensionAbility to process content that requires translation and obtain the translated result.

For details about the inheritance relationship of each ability, see Inheritance Relationship.

NOTE

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.

Modules to Import

import { ActionExtensionAbility } from '@kit.AbilityKit';

ActionExtensionAbility

The ActionExtensionAbility module provides a template for you to implement custom actions. It inherits from UIExtensionAbility.

ActionExtensionAbility is mainly designed to handle content viewing and interaction within the host application. For example, you can add a bookmark, translate the selected text into another language, or edit an image on the current page.

System capability: SystemCapability.Ability.AbilityRuntime.AbilityCore