• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ContinueMissionInfo
2
3The **ContinueMissionInfo** module defines the parameters required for initiating mission continuation with the bundle name specified. For details about mission continuation, see [continueMission](js-apis-distributedMissionManager.md#distributedmissionmanagercontinuemission10).
4
5> **NOTE**
6>
7> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
8> The APIs provided by this module are system APIs.
9
10## Modules to Import
11
12```ts
13import distributedMissionManager from '@ohos.distributedMissionManager';
14```
15
16## Attributes
17
18**System capability**: SystemCapability.Ability.AbilityRuntime.Mission
19
20| Name      | Type  | Readable  | Writable  | Description     |
21| -------- | ------ | ---- | ---- | ------- |
22| srcDeviceId | string | Yes   | Yes   | ID of the source device.|
23| dstDeviceId | string | Yes   | Yes   | ID of the target device.|
24| bundleName | string | Yes   | Yes   | Name of the bundle to which the mission belongs.|
25| wantParam | {[key: string]: Object} | Yes   | Yes   | Extended parameters.|
26
27**Example**
28
29  ```ts
30  import distributedMissionManager from '@ohos.distributedMissionManager';
31
32  var parameter =  {
33      srcDeviceId: "",
34      dstDeviceId: "",
35      bundleName: "ohos.test.continueapp",
36      wantParam: {"key": "value"}
37  };
38  try {
39      distributedMissionManager.continueMission(parameter, (error) => {
40          if (error.code != 0) {
41              console.error('continueMission failed, cause: ' + JSON.stringify(error))
42          }
43          console.info('continueMission finished')
44      })
45  } catch (error) {
46      console.error('continueMission failed, cause: ' + JSON.stringify(error))
47  }
48  ```
49