js-apis-inner-application-continueCallback.md 1.2 KB
Newer Older
1 2 3 4 5 6
# ContinueCallback

The **ContinueCallback** module defines the callback function that indicates the result of mission continuation. For details about mission continuation, see [continueMission](js-apis-distributedMissionManager.md#distributedmissionmanagercontinuemission).

**System capability**: SystemCapability.Ability.AbilityRuntime.Mission

7 8 9
| Name                    | Type      | Readable   | Writable   | Description                 |
| --------------------- | -------- | ---- | ---- | ------------------ |
| onContinueDone | function | Yes    | No    | Mission continuation result.     |
10 11 12 13

**Example**

  ```ts
14
  import distributedMissionManager from '@ohos.distributedMissionManager';
15 16

  let continueDeviceInfo = {
17 18 19 20 21 22
    srcDeviceId: '123',
    dstDeviceId: '456',
    missionId: 123,
    wantParam: {
        'key':'value'
    }
23 24 25 26 27 28 29 30 31
  };

  let continueCallback = {
      onContinueDone(result) {
          console.log('onContinueDone, result: ' + JSON.stringify(result));
      }
  };

  distributedMissionManager.continueMission(continueDeviceInfo, continueCallback, (error) => {
32 33 34 35
    if (error.code != 0) {
        console.error('continueMission failed, cause: ' + JSON.stringify(error))
    }
    console.info('continueMission finished')
36 37
  })
  ```