WantAgentInfo (System API)
The module defines the information required for triggering a WantAgent.
NOTE
The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
This topic describes only system APIs provided by the module. For details about its public APIs, see WantAgentInfo.
Modules to Import
import { wantAgent as abilityWantAgent } from '@kit.AbilityKit';
WantAgentInfo
Defines the information required for triggering a WantAgent object. The information can be used as an input parameter in getWantAgent to obtain a specified WantAgent object.
System capability: SystemCapability.Ability.AbilityRuntime.Core
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| userId22+ | number | No | Yes | User ID. The value must be greater than or equal to 0. The default value is the user ID of the caller. Model restriction: This API can be used only in the stage model. |
LocalWantAgentInfo20+
Defines the information required for triggering a local WantAgent object. The information can be used as an input parameter in createLocalWantAgent to obtain a local WantAgent object.
System capability: SystemCapability.Ability.AbilityRuntime.Core
System API: This is a system API.
Model restriction: This API can be used only in the stage model.
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| wants | Array<Want> | No | No | Array of all Want objects. Currently, only one Want object is supported. If multiple values are passed in, only the first member in the array is used. |
| operationType | abilityWantAgent.OperationType | No | Yes | Type of the operation to execute. |
| requestCode | number | No | No | Custom request code, which is used to identify the operation to execute. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 js-apis-app-ability-appServiceExtensionAbility
openharmony 鸿蒙 js-apis-inner-wantAgent-triggerInfo-sys
openharmony 鸿蒙 js-apis-appControl-sys
openharmony 鸿蒙 js-apis-app-ability-environmentCallback
openharmony 鸿蒙 js-apis-inner-application-missionInfo-sys
openharmony 鸿蒙 js-apis-bundleManager-sharedBundleInfo-sys
openharmony 鸿蒙 js-apis-inner-application-continueMissionInfo-sys
openharmony 鸿蒙 js-apis-inner-application-appServiceExtensionContext
openharmony 鸿蒙 js-apis-bundleManager-businessAbilityInfo-sys