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

!16876 长时任务修改头文件beta5

Merge pull request !16876 from 朱天怡/OpenHarmony-3.2-Beta5
......@@ -205,7 +205,7 @@ wantAgent.getWantAgent(wantAgentInfo).then((wantAgentObj) => {
Stage模型示例:
```ts
import Ability from '@ohos.application.Ability';
import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager';
import wantAgent from '@ohos.wantAgent';
......@@ -297,7 +297,7 @@ wantAgent.getWantAgent(wantAgentInfo).then((wantAgentObj) => {
Stage模型示例:
```ts
import Ability from '@ohos.application.Ability';
import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager';
import wantAgent from '@ohos.wantAgent';
......@@ -365,7 +365,7 @@ backgroundTaskManager.stopBackgroundRunning(featureAbility.getContext(), callbac
Stage模型示例:
```ts
import Ability from '@ohos.application.Ability';
import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager';
function callback(err, data) {
......@@ -422,7 +422,7 @@ backgroundTaskManager.stopBackgroundRunning(featureAbility.getContext()).then(()
Stage模型示例:
```ts
import Ability from '@ohos.application.Ability';
import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager';
export default class MainAbility extends Ability {
......
......@@ -255,7 +255,7 @@ startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: Want
**示例**
```js
import Ability from '@ohos.application.Ability'
import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager';
import wantAgent from '@ohos.wantAgent';
......@@ -334,7 +334,7 @@ startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: Want
**示例**
```js
import Ability from '@ohos.application.Ability'
import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager';
import wantAgent from '@ohos.wantAgent';
......@@ -400,7 +400,7 @@ stopBackgroundRunning(context: Context, callback: AsyncCallback<void>): vo
**示例**
```js
import Ability from '@ohos.application.Ability'
import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager';
function callback(error, data) {
......@@ -461,7 +461,7 @@ stopBackgroundRunning(context: Context): Promise<void>
**示例**
```js
import Ability from '@ohos.application.Ability'
import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager';
export default class MainAbility extends Ability {
......
......@@ -293,7 +293,7 @@ struct Index {
3、当需要跨设备或者跨应用在后台执行长时任务时,可以通过Call的方式在后台创建并运行Ability。使用方式参考[Call调用开发指南(同设备)](../application-models/uiability-intra-device-interaction.md#通过call调用实现uiability交互仅对系统应用开放)[Call调用开发指南(跨设备)](../application-models/hop-multi-device-collaboration.md#通过跨设备call调用实现多端协同)
```ts
import Ability from '@ohos.application.Ability'
import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager';
import wantAgent from '@ohos.wantAgent';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册