未验证 提交 c7385ef4 编写于 作者: O openharmony_ci 提交者: Gitee

!2493 修复元能力和包管理相关内源演练问题

Merge pull request !2493 from 时睿/master
......@@ -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 forwarding 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 is 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 is not installed.
installWithBackgroundMode: true
},
deviceId: "",
......
......@@ -719,8 +719,8 @@ distroFilter示例:
"screenWindow": {
"policy": "include",
"value": ["454*454","466*466"]
}
“screenDensity”:{
},
"screenDensity":{
"policy": "exclude",
"value": ["ldpi","xldpi"]
},
......
......@@ -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形式返回结果。
**需要权限:**
......
......@@ -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&lt;void&gt;): void;
```js
this.context.terminateSelf((err) => {
console.log('terminateSelf result:' + JSON.stringfy(err));
console.log('terminateSelf result:' + JSON.stringify(err));
});
```
......@@ -273,9 +273,9 @@ terminateSelf(): Promise&lt;void&gt;;
```js
this.context.terminateSelf(want).then((data) => {
console.log('success:' + JSON.stringfy(data));
console.log('success:' + JSON.stringify(data));
}).catch((error) => {
console.log('failed:' + JSON.stringfy(error));
console.log('failed:' + JSON.stringify(error));
});
```
......@@ -404,7 +404,7 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;, requestCallback: As
```
this.context.requestPermissionsFromUser(permissions,(result) => {
console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result));
console.log('requestPermissionsFromUserresult:' + JSON.stringify(result));
});
```
......@@ -433,9 +433,9 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;) : Promise&lt;Permis
```
this.context.requestPermissionsFromUser(permissions).then((data) => {
console.log('success:' + JSON.stringfy(data));
console.log('success:' + JSON.stringify(data));
}).catch((error) => {
console.log('failed:' + JSON.stringfy(error));
console.log('failed:' + JSON.stringify(error));
});
```
......@@ -459,7 +459,7 @@ setMissionLabel(label: string, callback:AsyncCallback&lt;void&gt;): void;
```js
this.context.setMissionLabel("test",(result) => {
console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result));
console.log('requestPermissionsFromUserresult:' + JSON.stringify(result));
});
```
......@@ -488,9 +488,9 @@ setMissionLabel(label: string): Promise&lt;void&gt;
```js
this.context.setMissionLabel("test").then((data) => {
console.log('success:' + JSON.stringfy(data));
console.log('success:' + JSON.stringify(data));
}).catch((error) => {
console.log('failed:' + JSON.stringfy(error));
console.log('failed:' + JSON.stringify(error));
});
```
......@@ -9,8 +9,6 @@ Ability对应的任务信息。
## 导入模块
使用前需导入Want
```
import Want from '@ohos.application.Want';
......
......@@ -10,8 +10,6 @@
## 导入模块
使用前需导入ElementName和image
```
import { ElementName } from '../bundle/elementName';
......
......@@ -9,7 +9,7 @@ missionManager模块提供系统任务管理能力,开发者可以对系统任
## 导入模块
```
import missionManager from '@ohos.application.missionManager'
......@@ -390,9 +390,10 @@ unlockMission(missionId: number, callback: AsyncCallback&lt;void&gt;): void;
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| missionId | number | 是 | 任务ID。 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| missionId | number | 是 | 任务ID。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 执行结果回调函数。 |
**示例:**
......@@ -620,7 +621,7 @@ moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCall
moveMissionToFront(missionId: number, options?: StartOptions): Promise&lt;void&gt;;
把指定任务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.
先完成此消息的编辑!
想要评论请 注册