openharmony 鸿蒙 js-apis-inner-wantAgent-wantAgentInfo-sys

2026-08-25 浏览 (1)

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

NameTypeRead-OnlyOptionalDescription
userId22+numberNoYesUser 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.

NameTypeRead-OnlyOptionalDescription
wantsArray<Want>NoNoArray 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.
operationTypeabilityWantAgent.OperationTypeNoYesType of the operation to execute.
requestCodenumberNoNoCustom 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

openharmony 鸿蒙 js-apis-ability-errorCode

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/x23KPjw2