Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
5c1b453a
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
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看板
未验证
提交
5c1b453a
编写于
11月 21, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 21, 2022
浏览文件
操作
浏览文件
下载
差异文件
!11562 【元能力子系统】启动规则changeLog
Merge pull request !11562 from HuangXW/ChangeLog
上级
602c9122
b495a03f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
128 addition
and
0 deletion
+128
-0
zh-cn/release-notes/changelogs/weekly-20221025/changelogs-ability.md
...se-notes/changelogs/weekly-20221025/changelogs-ability.md
+128
-0
未找到文件。
zh-cn/release-notes/changelogs/weekly-20221025/changelogs-ability.md
0 → 100644
浏览文件 @
5c1b453a
# 元能力子系统ChangeLog
## cl.ability.1 应用组件启动规则变更
元能力子系统应用组件启动规则在如下场景中存在变更:
-
应用位于后台启动应用组件
-
跨应用启动invisible应用组件
-
跨应用启动FA模型的serviceAbility与dataAbility
-
使用startAbilityByCall接口
开发者需要根据以下说明对应用进行适配。
**变更影响**
若未适配新规则,在上述场景下将无法启动应用组件
> **注意,启动应用组件是指一切启动或连接Ability的行为:**
<br>
1. 启动Ability,如使用startAbility、startServiceExtensionAbility、startAbilityByCall等接口。
<br>
2. 连接Ability,如使用connectAbility、connectServiceExtensionAbility、acquireDataAbilityHelper、createDataShareHelper等接口。
**关键的接口/组件变更**
-
涉及的应用组件
-
Stage模型
-
Ability
-
ServiceExtension
-
DataShareExtension
-
FA模型
-
PageAbility
-
ServiceAbility
-
DataAbility
-
涉及接口
-
Stage模型
-
startAbility(want: Want, callback: AsyncCallback
<void>
): void;
-
startAbility(want: Want, options: StartOptions, callback: AsyncCallback
<void>
): void;
-
startAbility(want: Want, options?: StartOptions): Promise
<void>
;
-
startAbilityByCall(want: Want): Promise
<Caller>
;
-
startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback
<void>
): void;
-
startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback
<void>
): void;
-
startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise
<void>
;
-
startAbilityForResult(want: Want, callback: AsyncCallback
<AbilityResult>
): void;
-
startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback
<AbilityResult>
): void;
-
startAbilityForResult(want: Want, options?: StartOptions): Promise
<AbilityResult>
;
-
startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback
<AbilityResult>
): void;
-
startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback
<void>
): void;
-
startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartOptions): Promise
<AbilityResult>
;
-
startServiceExtensionAbility(want: Want, callback: AsyncCallback
<void>
): void;
-
startServiceExtensionAbility(want: Want): Promise
<void>
;
-
startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback
<void>
): void;
-
startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise
<void>
;
-
stopServiceExtensionAbility(want: Want, callback: AsyncCallback
<void>
): void;
-
stopServiceExtensionAbility(want: Want): Promise
<void>
;
-
stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback
<void>
): void;
-
stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise
<void>
;
-
connectAbility(want: Want, options: ConnectOptions): number;
-
connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number;
-
createDataShareHelper(context: Context, uri: string, callback: AsyncCallback
<DataShareHelper>
): void
-
FA模型
-
startAbility(parameter: StartAbilityParameter, callback: AsyncCallback
<number>
): void;
-
startAbility(parameter: StartAbilityParameter): Promise
<number>
;
-
startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback
<AbilityResult>
): void;
-
startAbilityForResult(parameter: StartAbilityParameter): Promise
<AbilityResult>
;
-
acquireDataAbilityHelper(uri: string): DataAbilityHelper;
-
connectAbility(request: Want, options:ConnectOptions ): number;
**适配指导**
不同场景下的启动规则说明如下:
-
**应用后台启动应用组件**
-
OpenHarmony 3.2-beta3 版本规则:
-
应用位于后台时,启动应用组件不受任何限制。
-
OpenHarmony 3.2-Release 版本新规则:
-
当应用位于后台时,启动应用组件需鉴权,需申请的权限如下:
-
```json
{
"name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"grantMode": "system_grant",
"availableLevel": "system_basic",
"provisionEnable": true,
"distributedSceneEnable": false
}
```
> **注:**
<br>
1. 即使启动同应用的组件,也受该规则限制。
<br>
2. 对于API8以及之前的SDK,启动serviceAbility和dataAbility不受此规则限制。
-
**跨应用启动invisible应用组件**
-
OpenHarmony 3.2.beta3 版本规则:
-
对于APL为normal的应用,无法跨应用启动invisible的应用组件
-
OpenHarmony 3.2-Release 版本新规则:
-
所有应用,若需要跨应用启动invisible的应用组件,需鉴权,需申请的权限如下:
-
```json
{
"name": "ohos.permission.START_INVISIBLE_ABILITY",
"grantMode": "system_grant",
"availableLevel": "system_core",
"provisionEnable": true,
"distributedSceneEnable": false
}
```
-
**跨应用启动FA模型的serviceAbility与dataAbility**
-
OpenHarmony 3.2.beta3 版本规则:
-
可任意跨应用启动serviceAbility与dataAbility
-
OpenHarmony 3.2-Release 版本新规则:
-
serviceAbility与dataAbility的提供方应用需配置关联启动,否则无法被跨应用拉起。(普通应用无法配置关联启动)
-
**startAbilityByCall接口**
-
OpenHarmony 3.2.beta3 版本规则:
-
可任意进行Call调用
-
OpenHarmony 3.2-Release 版本新规则:
-
不支持同应用startAbilityByCall调用
-
跨应用startAbilityByCall调用需鉴权,需申请的权限如下:
- ```json
{
"name": "ohos.permission.ABILITY_BACKGROUND_COMMUNICATION",
"grantMode": "system_grant",
"availableLevel": "system_basic",
"provisionEnable": true,
"distributedSceneEnable": false
}
```
> **注:**
<br>
使用startAbilityByCall接口同时也受上述后台启动、跨应用启动invisible规则的限制。
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录