提交 023f0733 编写于 作者: W wangqing

文档修改

Signed-off-by: Nwangqing <wangqing136@huawei.com>
上级 45a0d5bb
...@@ -110,17 +110,17 @@ ohos.permission.KEEP_BACKGROUND_RUNNING ...@@ -110,17 +110,17 @@ ohos.permission.KEEP_BACKGROUND_RUNNING
**表4** 后台模式类型 **表4** 后台模式类型
| 参数名 | id值 | 描述 | | 参数名 | id值 | 描述 | 配置项 |
| -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| DATA_TRANSFER | 1 | 数据传输 | | DATA_TRANSFER | 1 | 数据传输 | dataTransfer |
| AUDIO_PLAYBACK | 2 | 音频播放 | | AUDIO_PLAYBACK | 2 | 音频播放 | audioPlayback |
| AUDIO_RECORDING | 3 | 录音 | | AUDIO_RECORDING | 3 | 录音 | audioRecording |
| LOCATION | 4 | 定位导航 | | LOCATION | 4 | 定位导航 | location |
| BLUETOOTH_INTERACTION | 5 | 蓝牙相关 | | BLUETOOTH_INTERACTION | 5 | 蓝牙相关 | bluetoothInteraction |
| MULTI_DEVICE_CONNECTION | 6 | 多设备互联 | | MULTI_DEVICE_CONNECTION | 6 | 多设备互联 | multiDeviceConnection |
| WIFI_INTERACTION | 7 | WLAN相关(系统保留) | | WIFI_INTERACTION | 7 | WLAN相关(系统保留) | wifiInteraction |
| VOIP | 8 | 音视频通话(系统保留) | | VOIP | 8 | 音视频通话(系统保留) | voip |
| TASK_KEEPING | 9 | 计算任务(仅供PC使用) | | TASK_KEEPING | 9 | 计算任务(仅供PC使用) | taskKeeping |
## 开发步骤 ## 开发步骤
...@@ -129,13 +129,30 @@ ohos.permission.KEEP_BACKGROUND_RUNNING ...@@ -129,13 +129,30 @@ ohos.permission.KEEP_BACKGROUND_RUNNING
```json ```json
"module": { "module": {
"package": "com.example.myapplication", "package": "com.example.myapplication",
..., ...
"reqPermissions": [ "abilities": [
{ ...
"name": "ohos.permission.KEEP_BACKGROUND_RUNNING" {
} "backgroundModes": [
] "dataTransfer",
"location",
...
],
...
"type": "service"
}
],
"defPermissions": [
{
"name": "ohos.permission.KEEP_BACKGROUND_RUNNING"
}
],
"reqPermissions": [
{
"name": "ohos.permission.KEEP_BACKGROUND_RUNNING"
}
]
} }
``` ```
......
...@@ -188,7 +188,7 @@ particleAbility.acquireDataAbilityHelper(uri) ...@@ -188,7 +188,7 @@ particleAbility.acquireDataAbilityHelper(uri)
startBackgroundRunning(id: number, request: NotificationRequest, callback: AsyncCallback&lt;void&gt;): void; startBackgroundRunning(id: number, request: NotificationRequest, callback: AsyncCallback&lt;void&gt;): void;
向系统申请长时任务,使用callback形式返回结果。(此接口为api7接口,后续会被废弃,请使用新的api8接口 向系统申请长时任务,使用callback形式返回结果。(此接口为api7接口,后续会被废弃,请使用新的[api8接口](js-apis-backgroundTaskManager.md)
**系统能力**:SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask **系统能力**:SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
...@@ -252,7 +252,7 @@ startBackgroundRunning(id: number, request: NotificationRequest): Promise&lt;voi ...@@ -252,7 +252,7 @@ startBackgroundRunning(id: number, request: NotificationRequest): Promise&lt;voi
**系统能力**:SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask **系统能力**:SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
向系统申请长时任务,使用promise形式返回结果。(此接口为api7接口,后续会被废弃,请使用新的api8接口 向系统申请长时任务,使用promise形式返回结果。(此接口为api7接口,后续会被废弃,请使用新的[api8接口](js-apis-backgroundTaskManager.md)
**参数:** **参数:**
...@@ -313,7 +313,7 @@ wantAgent.getWantAgent(wantAgentInfo).then((wantAgentObj) => { ...@@ -313,7 +313,7 @@ wantAgent.getWantAgent(wantAgentInfo).then((wantAgentObj) => {
cancelBackgroundRunning(callback: AsyncCallback&lt;void&gt;): void; cancelBackgroundRunning(callback: AsyncCallback&lt;void&gt;): void;
向系统申请取消长时任务,使用callback形式返回结果。(此接口为api7接口,后续会被废弃,请使用新的api8接口 向系统申请取消长时任务,使用callback形式返回结果。(此接口为api7接口,后续会被废弃,请使用新的[api8接口](js-apis-backgroundTaskManager.md)
**系统能力**:SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask **系统能力**:SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
...@@ -344,7 +344,7 @@ particleAbility.cancelBackgroundRunning(callback); ...@@ -344,7 +344,7 @@ particleAbility.cancelBackgroundRunning(callback);
cancelBackgroundRunning(): Promise&lt;void&gt;; cancelBackgroundRunning(): Promise&lt;void&gt;;
向系统申请取消长时任务,使用promise形式返回结果。(此接口为api7接口,后续会被废弃,请使用新的api8接口 向系统申请取消长时任务,使用promise形式返回结果。(此接口为api7接口,后续会被废弃,请使用新的[api8接口](js-apis-backgroundTaskManager.md)
**系统能力**:SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask **系统能力**:SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
...@@ -516,7 +516,7 @@ function onConnectCallback(element, remote){ ...@@ -516,7 +516,7 @@ function onConnectCallback(element, remote){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册