未验证 提交 b021e451 编写于 作者: 朱天怡 提交者: Gitee

修改头文件

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