From d2aa2af5371b83ee5c2f178ef496794e7f40c1ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=A4=A9=E6=80=A1?= Date: Thu, 6 Apr 2023 01:45:27 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=B4=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 朱天怡 --- .../reference/apis/js-apis-backgroundTaskManager.md | 8 ++++---- .../js-apis-resourceschedule-backgroundTaskManager.md | 8 ++++---- .../task-management/continuous-task-dev-guide.md | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-backgroundTaskManager.md b/zh-cn/application-dev/reference/apis/js-apis-backgroundTaskManager.md index efed827ea4..cc090b4db7 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-backgroundTaskManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-backgroundTaskManager.md @@ -205,7 +205,7 @@ wantAgent.getWantAgent(wantAgentInfo).then((wantAgentObj) => { Stage模型示例: ```ts -import Ability from '@ohos.application.Ability'; +import Ability 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 Ability 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 Ability 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 Ability from '@ohos.app.ability.UIAbility'; import backgroundTaskManager from '@ohos.backgroundTaskManager'; export default class MainAbility extends Ability { diff --git a/zh-cn/application-dev/reference/apis/js-apis-resourceschedule-backgroundTaskManager.md b/zh-cn/application-dev/reference/apis/js-apis-resourceschedule-backgroundTaskManager.md index c9f77d0afa..1fddc6fa03 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-resourceschedule-backgroundTaskManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-resourceschedule-backgroundTaskManager.md @@ -255,7 +255,7 @@ startBackgroundRunning(context: Context, bgMode: BackgroundMode, wantAgent: Want **示例**: ```js -import Ability from '@ohos.application.Ability' +import Ability 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 Ability 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 Ability 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 Ability from '@ohos.app.ability.UIAbility'; import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager'; export default class MainAbility extends Ability { diff --git a/zh-cn/application-dev/task-management/continuous-task-dev-guide.md b/zh-cn/application-dev/task-management/continuous-task-dev-guide.md index c1f2978bed..064a93087b 100644 --- a/zh-cn/application-dev/task-management/continuous-task-dev-guide.md +++ b/zh-cn/application-dev/task-management/continuous-task-dev-guide.md @@ -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 Ability from '@ohos.app.ability.UIAbility'; import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager'; import wantAgent from '@ohos.wantAgent'; -- GitLab