Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
9348d905
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看板
提交
9348d905
编写于
5月 18, 2023
作者:
X
xinking129
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix review
Signed-off-by:
N
xinking129
<
xinxin13@huawei.com
>
上级
f269ebe4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
10 deletion
+24
-10
zh-cn/application-dev/reference/apis/js-apis-application-StaticSubscriberExtensionContext.md
...s/js-apis-application-StaticSubscriberExtensionContext.md
+6
-10
zh-cn/application-dev/reference/errorcodes/errorcode-ability.md
...application-dev/reference/errorcodes/errorcode-ability.md
+18
-0
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-application-StaticSubscriberExtensionContext.md
浏览文件 @
9348d905
...
@@ -25,12 +25,11 @@ export default class MyStaticSubscriberExtensionAbility extends StaticSubscriber
...
@@ -25,12 +25,11 @@ export default class MyStaticSubscriberExtensionAbility extends StaticSubscriber
startAbility(want: Want, callback: AsyncCallback
<
void
>
): void;
startAbility(want: Want, callback: AsyncCallback
<
void
>
): void;
启动Ability(callback形式)
。
拉起一个静态订阅所属的同应用的Ability。使用callback异步回调
。
使用规则:
使用规则:
-
调用方应用位于后台时,使用该接口启动Ability需申请
`ohos.permission.START_ABILITIES_FROM_BACKGROUND`
权限
-
调用方应用位于后台时,使用该接口启动Ability需申请
`ohos.permission.START_ABILITIES_FROM_BACKGROUND`
权限
-
跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请
`ohos.permission.START_INVISIBLE_ABILITY`
权限
-
跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请
`ohos.permission.START_INVISIBLE_ABILITY`
权限
-
组件启动规则详见:
[
组件启动规则(Stage模型)
](
../../application-models/component-startup-rules.md
)
**系统能力**
:SystemCapability.Ability.AbilityRuntime.Core
**系统能力**
:SystemCapability.Ability.AbilityRuntime.Core
...
@@ -45,11 +44,10 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
...
@@ -45,11 +44,10 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
**错误码:**
**错误码:**
以下错误码详细介绍请参考
[
errcode-ability
](
../errorcodes/errorcode-ability.md
)
。
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| -------- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ |
| 201 | The application does not have permission to call the interface. |
| 202 | The application is not system-app, can not use system-api. |
| 401 | If the input parameter is not valid parameter. |
| 16000001 | The specified ability does not exist. |
| 16000001 | The specified ability does not exist. |
| 16000002 | Incorrect ability type. |
| 16000002 | Incorrect ability type. |
| 16000004 | Can not start invisible component. |
| 16000004 | Can not start invisible component. |
...
@@ -94,12 +92,11 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
...
@@ -94,12 +92,11 @@ startAbility(want: Want, callback: AsyncCallback<void>): void;
startAbility(want: Want): Promise
<
void
>
;
startAbility(want: Want): Promise
<
void
>
;
启动Ability(promise形式)
。
拉起一个静态订阅所属的同应用的Ability。使用Promise异步回调
。
使用规则:
使用规则:
-
调用方应用位于后台时,使用该接口启动Ability需申请
`ohos.permission.START_ABILITIES_FROM_BACKGROUND`
权限
-
调用方应用位于后台时,使用该接口启动Ability需申请
`ohos.permission.START_ABILITIES_FROM_BACKGROUND`
权限
-
跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请
`ohos.permission.START_INVISIBLE_ABILITY`
权限
-
跨应用场景下,目标Ability的visible属性若配置为false,调用方应用需申请
`ohos.permission.START_INVISIBLE_ABILITY`
权限
-
组件启动规则详见:
[
组件启动规则(Stage模型)
](
../../application-models/component-startup-rules.md
)
**系统能力**
:SystemCapability.Ability.AbilityRuntime.Core
**系统能力**
:SystemCapability.Ability.AbilityRuntime.Core
...
@@ -119,11 +116,10 @@ startAbility(want: Want): Promise<void>;
...
@@ -119,11 +116,10 @@ startAbility(want: Want): Promise<void>;
**错误码:**
**错误码:**
以下错误码详细介绍请参考
[
errcode-ability
](
../errorcodes/errorcode-ability.md
)
。
| 错误码ID | 错误信息 |
| 错误码ID | 错误信息 |
| -------- | ------------------------------------------------------------ |
| -------- | ------------------------------------------------------------ |
| 201 | The application does not have permission to call the interface. |
| 202 | The application is not system-app, can not use system-api. |
| 401 | If the input parameter is not valid parameter. |
| 16000001 | The specified ability does not exist. |
| 16000001 | The specified ability does not exist. |
| 16000002 | Incorrect ability type. |
| 16000002 | Incorrect ability type. |
| 16000004 | Can not start invisible component. |
| 16000004 | Can not start invisible component. |
...
...
zh-cn/application-dev/reference/errorcodes/errorcode-ability.md
浏览文件 @
9348d905
...
@@ -583,6 +583,24 @@ The specified mission listener does not exist.
...
@@ -583,6 +583,24 @@ The specified mission listener does not exist.
确认操作的任务监听器是否存在。
确认操作的任务监听器是否存在。
## 16300003 目标应用程序不是自身应用程序
**错误信息**
The target application is not self application.
**错误描述**
当目标应用程序不是自身应用程序时,方法将返回该错误码。
**可能原因**
目标应用程序不是自身应用程序。
**处理步骤**
确认目标应用程序是否为自身应用程序。
## 18500001 指定的包名无效
## 18500001 指定的包名无效
**错误信息**
**错误信息**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录