Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
1edff15a
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1edff15a
编写于
12月 24, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 24, 2022
浏览文件
操作
浏览文件
下载
差异文件
!12808 wantagent文档修改
Merge pull request !12808 from zhuhan/api_fix
上级
3a0cc0ec
5b3f1850
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
26 deletion
+22
-26
zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md
...ation-dev/reference/apis/js-apis-app-ability-wantAgent.md
+3
-7
zh-cn/application-dev/reference/apis/js-apis-inner-wantAgent-triggerInfo.md
...dev/reference/apis/js-apis-inner-wantAgent-triggerInfo.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-wantAgent.md
zh-cn/application-dev/reference/apis/js-apis-wantAgent.md
+18
-18
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md
浏览文件 @
1edff15a
# @ohos.app.ability.wantAgent (WantAgent模块)
app.ability.WantAgent模块提供了
触发、取消、比较WantAgent实例和获取bundle名称的能力,包括创建WantAgent实例、获取实例的用户ID、获取want信息等
。该模块将会取代
[
@ohos.wantAgent
](
js-apis-wantAgent.md
)
模块,建议优先使用本模块。
app.ability.WantAgent模块提供了
创建WantAgent实例、获取实例的用户ID、获取want信息、比较WantAgent实例和获取bundle名称等能力
。该模块将会取代
[
@ohos.wantAgent
](
js-apis-wantAgent.md
)
模块,建议优先使用本模块。
> **说明:**
>
...
...
@@ -1042,10 +1042,6 @@ try{
}
```
//TODO WantAgent.trigger Callback
## WantAgent.trigger
trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: AsyncCallback
\<
CompleteData
\>
): void
...
...
@@ -1059,7 +1055,7 @@ trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: AsyncCallback\<Co
| 参数名 | 类型 | 必填 | 说明 |
| ----------- | ----------------------------- | ---- | ------------------------------- |
| agent | WantAgent | 是 | WantAgent对象。 |
| triggerInfo |
TriggerInfo
| 是 | TriggerInfo对象。 |
| triggerInfo |
[
TriggerInfo
](
js-apis-inner-wantAgent-triggerInfo.md
)
| 是 | TriggerInfo对象。 |
| callback | AsyncCallback
\<
CompleteData
\>
| 否 | 主动激发WantAgent实例的回调方法。 |
**错误码:**
...
...
@@ -1096,7 +1092,7 @@ trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: AsyncCallback\<Co
var
wantAgent
;
// triggerInfo
var
triggerInfo
=
{
code
:
0
code
:
0
//自定义义结果码
}
//WantAgentInfo对象
var
wantAgentInfo
=
{
...
...
zh-cn/application-dev/reference/apis/js-apis-inner-wantAgent-triggerInfo.md
浏览文件 @
1edff15a
...
...
@@ -6,7 +6,7 @@
| 名称 | 类型 | 必填 | 说明 |
| ---------- | --- |-------------------- | ----------- |
| code | number | 是 |
result code
。 |
| code | number | 是 |
提供给目标wantAgent的自定义结果码
。 |
| want | Want | 否 | Want。 |
| permission | string | 否 | 权限定义。 |
| extraInfo | {[key: string]: any} | 否 | 额外数据。 |
zh-cn/application-dev/reference/apis/js-apis-wantAgent.md
浏览文件 @
1edff15a
# @ohos.wantAgent (WantAgent模块)
WantAgent模块提供了
触发、取消、比较WantAgent实例和获取bundle名称的能力,包括创建WantAgent实例、获取实例的用户ID、获取want信息等
。
WantAgent模块提供了
创建WantAgent实例、获取实例的用户ID、获取want信息、比较WantAgent实例和获取bundle名称等能力
。
> **说明:**
>
...
...
@@ -8,7 +8,7 @@ WantAgent模块提供了触发、取消、比较WantAgent实例和获取bundle
## 导入模块
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
```
...
...
@@ -29,7 +29,7 @@ getWantAgent(info: WantAgentInfo, callback: AsyncCallback\<WantAgent\>): void
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
//getWantAgent回调
...
...
@@ -91,7 +91,7 @@ getWantAgent(info: WantAgentInfo): Promise\<WantAgent\>
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
...
...
@@ -147,7 +147,7 @@ getBundleName(agent: WantAgent, callback: AsyncCallback\<string\>): void
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
...
...
@@ -224,7 +224,7 @@ getBundleName(agent: WantAgent): Promise\<string\>
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
//wantAgent对象
...
...
@@ -287,7 +287,7 @@ getUid(agent: WantAgent, callback: AsyncCallback\<number\>): void
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
...
...
@@ -364,7 +364,7 @@ getUid(agent: WantAgent): Promise\<number\>
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
...
...
@@ -430,7 +430,7 @@ getWant(agent: WantAgent, callback: AsyncCallback\<Want\>): void
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
...
...
@@ -509,7 +509,7 @@ getWant(agent: WantAgent): Promise\<Want\>
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
...
...
@@ -573,7 +573,7 @@ cancel(agent: WantAgent, callback: AsyncCallback\<void\>): void
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
...
...
@@ -650,7 +650,7 @@ cancel(agent: WantAgent): Promise\<void\>
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
...
...
@@ -710,12 +710,12 @@ trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: Callback\<Complet
| 参数名 | 类型 | 必填 | 说明 |
| ----------- | ----------------------------- | ---- | ------------------------------- |
| agent | WantAgent | 是 | WantAgent对象。 |
| triggerInfo |
TriggerInfo
| 是 | TriggerInfo对象。 |
| triggerInfo |
[
TriggerInfo
](
js-apis-inner-wantAgent-triggerInfo.md
)
| 是 | TriggerInfo对象。 |
| callback | AsyncCallback
\<
CompleteData
\>
| 否 | 主动激发WantAgent实例的回调方法。 |
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
...
...
@@ -792,7 +792,7 @@ equal(agent: WantAgent, otherAgent: WantAgent, callback: AsyncCallback\<boolean\
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
...
...
@@ -872,7 +872,7 @@ equal(agent: WantAgent, otherAgent: WantAgent): Promise\<boolean\>
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
...
...
@@ -936,7 +936,7 @@ getOperationType(agent: WantAgent, callback: AsyncCallback\<number>): void;
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
//wantAgent对象
...
...
@@ -1002,7 +1002,7 @@ getOperationType(agent: WantAgent): Promise\<number>;
**示例:**
```
j
s
```
t
s
import
WantAgent
from
'
@ohos.wantAgent
'
;
//wantAgent对象
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录