Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
c7385ef4
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看板
未验证
提交
c7385ef4
编写于
3月 24, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 24, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2493 修复元能力和包管理相关内源演练问题
Merge pull request !2493 from 时睿/master
上级
e10e1ce1
fb6f85c7
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
33 addition
and
37 deletion
+33
-37
zh-cn/application-dev/ability/fa-pageability.md
zh-cn/application-dev/ability/fa-pageability.md
+13
-14
zh-cn/application-dev/quick-start/package-structure.md
zh-cn/application-dev/quick-start/package-structure.md
+2
-2
zh-cn/application-dev/reference/apis/js-apis-Bundle.md
zh-cn/application-dev/reference/apis/js-apis-Bundle.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-ability-context.md
...application-dev/reference/apis/js-apis-ability-context.md
+11
-11
zh-cn/application-dev/reference/apis/js-apis-application-MissionInfo.md
...ion-dev/reference/apis/js-apis-application-MissionInfo.md
+0
-2
zh-cn/application-dev/reference/apis/js-apis-application-MissionSnapshot.md
...dev/reference/apis/js-apis-application-MissionSnapshot.md
+0
-2
zh-cn/application-dev/reference/apis/js-apis-missionManager.md
.../application-dev/reference/apis/js-apis-missionManager.md
+6
-5
未找到文件。
zh-cn/application-dev/ability/fa-pageability.md
浏览文件 @
c7385ef4
...
...
@@ -62,32 +62,31 @@ featureAbility.startAbility({
entities
:
[
""
],
type
:
""
,
options
:
{
//
indicates the grant to perform read operations on the URI
//
Grant the permission to perform read operations on the URI.
authReadUriPermission
:
true
,
//
indicates the grant to perform write operations on the URI
//
Grant the permission to perform write operations on the URI.
authWriteUriPermission
:
true
,
// support forward
intent result to origin ability
// support forward
ing the intent result to the ability.
abilityForwardResult
:
true
,
//
used for marking the ability start-up is triggered by continuation
//
Enable abiligy continuation.
abilityContinuation
:
true
,
//
specifies whether a component does not belong to ohos
//
Specify that a component does not belong to ohos.
notOhosComponent
:
true
,
//
specifies whether an ability is started
//
Specify that an ability is started.
abilityFormEnabled
:
true
,
//
indicates the grant
for possible persisting on the URI.
//
Grant the permission
for possible persisting on the URI.
authPersistableUriPermission
:
true
,
//
indicates the grant for possible persisting on the
URI.
//
Grant the permission for possible persisting on the prefix
URI.
authPrefixUriPermission
:
true
,
//
support distributed scheduling system start up multiple devices
//
Support distributed scheduling system startup on multiple devices.
abilitySliceMultiDevice
:
true
,
// indicates that an ability using the service template is started regardless of whether the
// host application has been started.
// A service ability is started regardless of whether the host application has been started.
startForegroundAbility
:
true
,
//
install the specified ability if it'
s not installed.
//
Install the specified ability if it i
s not installed.
installOnDemand
:
true
,
//
return result to origin ability slice
//
Return the result to the ability slice.
abilitySliceForwardResult
:
true
,
//
install the specified ability with background mode if it'
s not installed.
//
Install the specified ability with background mode if it i
s not installed.
installWithBackgroundMode
:
true
},
deviceId
:
""
,
...
...
zh-cn/application-dev/quick-start/package-structure.md
浏览文件 @
c7385ef4
...
...
@@ -719,8 +719,8 @@ distroFilter示例:
"screenWindow"
:
{
"policy"
:
"include"
,
"value"
:
[
"454*454"
,
"466*466"
]
}
,
“screenDensity”
:
{
}
,
"screenDensity"
:{
"policy"
:
"exclude"
,
"value"
:
[
"ldpi"
,
"xldpi"
]
},
...
...
zh-cn/application-dev/reference/apis/js-apis-Bundle.md
浏览文件 @
c7385ef4
...
...
@@ -1095,7 +1095,7 @@ bundle.getAbilityIcon(bundleName, abilityName)
getAbilityIcon(bundleName: string, abilityName: string, callback: AsyncCallback
\<
image.PixelMap>): void;
以异步方法通过bundleName和abilityName获取对应的
[
PixelMap
](
https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-image.md
)
,使用callback形式返回结果。
以异步方法通过bundleName和abilityName获取对应
Icon
的
[
PixelMap
](
https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis/js-apis-image.md
)
,使用callback形式返回结果。
**需要权限:**
...
...
zh-cn/application-dev/reference/apis/js-apis-ability-context.md
浏览文件 @
c7385ef4
...
...
@@ -10,10 +10,10 @@ Ability的上下文环境,继承自Context。
## 使用说明
在使用AbilityContext的功能前,需要通过Ability子类实例获取。
在使用AbilityContext的功能前,需要通过Ability子类实例获取。
```
js
import
Ability
from
'
@ohos.application.Ability
'
class
MainAbility
extends
Ability
{
...
...
@@ -250,7 +250,7 @@ terminateSelf(callback: AsyncCallback<void>): void;
```
js
this
.
context
.
terminateSelf
((
err
)
=>
{
console
.
log
(
'
terminateSelf result:
'
+
JSON
.
stringfy
(
err
));
console
.
log
(
'
terminateSelf result:
'
+
JSON
.
string
i
fy
(
err
));
});
```
...
...
@@ -273,9 +273,9 @@ terminateSelf(): Promise<void>;
```
js
this
.
context
.
terminateSelf
(
want
).
then
((
data
)
=>
{
console
.
log
(
'
success:
'
+
JSON
.
stringfy
(
data
));
console
.
log
(
'
success:
'
+
JSON
.
string
i
fy
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringfy
(
error
));
console
.
log
(
'
failed:
'
+
JSON
.
string
i
fy
(
error
));
});
```
...
...
@@ -404,7 +404,7 @@ requestPermissionsFromUser(permissions: Array<string>, requestCallback: As
```
this.context.requestPermissionsFromUser(permissions,(result) => {
console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result));
console.log('requestPermissionsFromUserresult:' + JSON.string
i
fy(result));
});
```
...
...
@@ -433,9 +433,9 @@ requestPermissionsFromUser(permissions: Array<string>) : Promise<Permis
```
this.context.requestPermissionsFromUser(permissions).then((data) => {
console.log('success:' + JSON.stringfy(data));
console.log('success:' + JSON.string
i
fy(data));
}).catch((error) => {
console.log('failed:' + JSON.stringfy(error));
console.log('failed:' + JSON.string
i
fy(error));
});
```
...
...
@@ -459,7 +459,7 @@ setMissionLabel(label: string, callback:AsyncCallback<void>): void;
```
js
this
.
context
.
setMissionLabel
(
"
test
"
,(
result
)
=>
{
console
.
log
(
'
requestPermissionsFromUserresult:
'
+
JSON
.
stringfy
(
result
));
console
.
log
(
'
requestPermissionsFromUserresult:
'
+
JSON
.
string
i
fy
(
result
));
});
```
...
...
@@ -488,9 +488,9 @@ setMissionLabel(label: string): Promise<void>
```
js
this
.
context
.
setMissionLabel
(
"
test
"
).
then
((
data
)
=>
{
console
.
log
(
'
success:
'
+
JSON
.
stringfy
(
data
));
console
.
log
(
'
success:
'
+
JSON
.
string
i
fy
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
'
failed:
'
+
JSON
.
stringfy
(
error
));
console
.
log
(
'
failed:
'
+
JSON
.
string
i
fy
(
error
));
});
```
zh-cn/application-dev/reference/apis/js-apis-application-MissionInfo.md
浏览文件 @
c7385ef4
...
...
@@ -9,8 +9,6 @@ Ability对应的任务信息。
## 导入模块
使用前需导入Want
```
import Want from '@ohos.application.Want';
...
...
zh-cn/application-dev/reference/apis/js-apis-application-MissionSnapshot.md
浏览文件 @
c7385ef4
...
...
@@ -10,8 +10,6 @@
## 导入模块
使用前需导入ElementName和image
```
import { ElementName } from '../bundle/elementName';
...
...
zh-cn/application-dev/reference/apis/js-apis-missionManager.md
浏览文件 @
c7385ef4
...
...
@@ -9,7 +9,7 @@ missionManager模块提供系统任务管理能力,开发者可以对系统任
## 导入模块
```
import missionManager from '@ohos.application.missionManager'
...
...
@@ -390,9 +390,10 @@ unlockMission(missionId: number, callback: AsyncCallback<void>): void;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| missionId | number | 是 | 任务ID。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| missionId | number | 是 | 任务ID。 |
| callback | AsyncCallback
<
void
>
| 是 | 执行结果回调函数。 |
**示例:**
...
...
@@ -620,7 +621,7 @@ moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCall
moveMissionToFront(missionId: number, options?: StartOptions): Promise
<
void
>
;
把指定任务id的任务切到前台,以promise的方式返回。
把指定任务id的任务切到前台,
同时指定任务切换到前台时的启动参数,例如窗口模式、设备ID等,
以promise的方式返回。
**系统能力**
:SystemCapability.Ability.AbilityRuntime.Mission
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录