当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1.4K Star 7.4K Fork 8.2K

OpenHarmony/docs
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
js-apis-application-Want.md 2.03 KB
一键复制 编辑 原始数据 按行查看 历史

Want

Want模块提供系统的基本通信组件的能力。

说明:

本模块首批接口从API version 8 开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。

导入模块

import Want from '@ohos.application.Want';

属性

系统能力:以下各项对应的系统能力均为SystemCapability.Ability.AbilityBase

名称 读写属性 类型 必填 描述
deviceId 只读 string 表示运行指定Ability的设备ID。
bundleName 只读 string 表示包描述。如果在Want中同时指定了BundleName和AbilityName,则Want可以直接匹配到指定的Ability。
abilityName 只读 string 表示待启动的Ability名称。如果在Want中该字段同时指定了package和AbilityName,则Want可以直接匹配到指定的Ability。
uri 只读 string 表示Uri描述。如果在Want中指定了Uri,则Want将匹配指定的Uri信息,包括scheme, schemeSpecificPart, authority和path信息。
type 只读 string 表示MIME type类型描述,比如:"text/plain" 、 "image/*"等。
flags 只读 number 表示处理Want的方式。默认传数字,具体参考:flags说明
action 只读 string 表示action选项描述。
parameters 只读 {[key: string]: any} 表示WantParams描述。
entities 只读 Array<string> 表示entities相关描述。
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
其他
1
https://gitee.com/openharmony/docs.git
git@gitee.com:openharmony/docs.git
openharmony
docs
docs
OpenHarmony-3.2-Beta1

搜索帮助