harmony 鸿蒙Common action and entities Values

  • 2023-02-03
  • 浏览 (693)

Common action and entities Values

The action field specifies the common operation (such as viewing, sharing, and application details) to be performed by the caller. In implicit Want, you can define this field and use it together with uri or parameters to specify the operation to be performed on the data, for example, viewing URI data. For example, if the URI is a website and the action is ohos.want.action.viewData, the application component that supports website viewing is matched. Declaring the action field in Want indicates that the invoked application is expected to support the declared operation. The actions field under skills in the configuration file indicates the operations supported by the application.

The following action values are available:

  • ACTION_HOME: action of starting the application entry component. It must be used together with ENTITY_HOME. The application icon on the home screen is an explicit entry component. Users can touch the icon to start the entry component. Multiple entry components can be configured for an application.

  • ACTION_CHOOSE: action of selecting local resource data, such as Contacts and Gallery. Generally, the system has corresponding Picker applications for different types of data.

  • ACTION_VIEW_DATA: action of viewing data. A website URI indicates the action for opening the website.

  • ACTION_VIEW_MULTIPLE_DATA: action of launching the UI for sending multiple data records.

The entities field specify the category information (such as browser and video player) of the target application component. It is a supplement to action in implicit Want. You can define this field to filter application categories, for example, browser. Declaring the entities field in Want indicates that the invoked application should belong to the declared category. The entities field under skills in the configuration file indicates the categories supported by the application.

The following entities values are available:

  • ENTITY_DEFAULT: default category, which is meaningless.

  • ENTITY_HOME: application components with an icon displayed on the home screen.

  • ENTITY_BROWSABLE: browser type.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Application Models

harmony 鸿蒙Using Explicit Want to Start an Application Component

harmony 鸿蒙Using Implicit Want to Open a Website

harmony 鸿蒙AbilityStage Component Container

harmony 鸿蒙Accessing a DataAbility

harmony 鸿蒙Accessing a DataShareExtensionAbility from the FA Model

harmony 鸿蒙AccessibilityExtensionAbility

harmony 鸿蒙API Switching Overview

harmony 鸿蒙Switching of app and deviceConfig

harmony 鸿蒙Application- or Component-Level Configuration (FA Model)

0  赞