• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License"),
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit AbilityKit
19 */
20
21import { AbilityInfo } from '../bundleManager/AbilityInfo';
22import { AbilityResult } from '../ability/abilityResult';
23import { AsyncCallback } from '../@ohos.base';
24import { ConnectOptions } from '../ability/connectOptions';
25import { HapModuleInfo } from '../bundleManager/HapModuleInfo';
26import Context from './Context';
27import Want from '../@ohos.app.ability.Want';
28import StartOptions from '../@ohos.app.ability.StartOptions';
29import OpenLinkOptions from '../@ohos.app.ability.OpenLinkOptions';
30import { Configuration } from '../@ohos.app.ability.Configuration';
31import { Caller } from '../@ohos.app.ability.UIAbility';
32import image from '../@ohos.multimedia.image';
33import dialogRequest from '../@ohos.app.ability.dialogRequest';
34import AbilityConstant from '../@ohos.app.ability.AbilityConstant';
35import type AbilityStartCallback from './AbilityStartCallback';
36import window from '../@ohos.window';
37import type AtomicServiceOptions from '../@ohos.app.ability.AtomicServiceOptions';
38
39/**
40 * The context of an ability. It allows access to ability-specific resources.
41 *
42 * @extends Context
43 * @syscap SystemCapability.Ability.AbilityRuntime.Core
44 * @stagemodelonly
45 * @since 9
46 */
47/**
48 * The context of an ability. It allows access to ability-specific resources.
49 *
50 * @extends Context
51 * @syscap SystemCapability.Ability.AbilityRuntime.Core
52 * @stagemodelonly
53 * @crossplatform
54 * @since 10
55 */
56/**
57 * The context of an ability. It allows access to ability-specific resources.
58 *
59 * @extends Context
60 * @syscap SystemCapability.Ability.AbilityRuntime.Core
61 * @stagemodelonly
62 * @crossplatform
63 * @atomicservice
64 * @since 11
65 */
66export default class UIAbilityContext extends Context {
67  /**
68   * Indicates configuration information about an ability.
69   *
70   * @type { AbilityInfo }
71   * @syscap SystemCapability.Ability.AbilityRuntime.Core
72   * @stagemodelonly
73   * @since 9
74   */
75  /**
76   * Indicates configuration information about an ability.
77   *
78   * @type { AbilityInfo }
79   * @syscap SystemCapability.Ability.AbilityRuntime.Core
80   * @stagemodelonly
81   * @crossplatform
82   * @since 10
83   */
84  /**
85   * Indicates configuration information about an ability.
86   *
87   * @type { AbilityInfo }
88   * @syscap SystemCapability.Ability.AbilityRuntime.Core
89   * @stagemodelonly
90   * @crossplatform
91   * @atomicservice
92   * @since 11
93   */
94  abilityInfo: AbilityInfo;
95
96  /**
97   * Indicates configuration information about the module.
98   *
99   * @type { HapModuleInfo }
100   * @syscap SystemCapability.Ability.AbilityRuntime.Core
101   * @stagemodelonly
102   * @since 9
103   */
104  /**
105   * Indicates configuration information about the module.
106   *
107   * @type { HapModuleInfo }
108   * @syscap SystemCapability.Ability.AbilityRuntime.Core
109   * @stagemodelonly
110   * @crossplatform
111   * @since 10
112   */
113  /**
114   * Indicates configuration information about the module.
115   *
116   * @type { HapModuleInfo }
117   * @syscap SystemCapability.Ability.AbilityRuntime.Core
118   * @stagemodelonly
119   * @crossplatform
120   * @atomicservice
121   * @since 11
122   */
123  currentHapModuleInfo: HapModuleInfo;
124
125  /**
126   * Indicates configuration information.
127   *
128   * @type { Configuration }
129   * @syscap SystemCapability.Ability.AbilityRuntime.Core
130   * @stagemodelonly
131   * @since 9
132   */
133  /**
134   * Indicates configuration information.
135   *
136   * @type { Configuration }
137   * @syscap SystemCapability.Ability.AbilityRuntime.Core
138   * @stagemodelonly
139   * @crossplatform
140   * @since 10
141   */
142  /**
143   * Indicates configuration information.
144   *
145   * @type { Configuration }
146   * @syscap SystemCapability.Ability.AbilityRuntime.Core
147   * @stagemodelonly
148   * @crossplatform
149   * @atomicservice
150   * @since 11
151   */
152  config: Configuration;
153
154  /**
155   * Indicates windowStage information.
156   * Exists from onWindowStageCreate lifecycle, does not exist from onWindowStageDestroy lifecycle.
157   *
158   * @type { window.WindowStage }
159   * @syscap SystemCapability.Ability.AbilityRuntime.Core
160   * @stagemodelonly
161   * @atomicservice
162   * @since 12
163   */
164  windowStage: window.WindowStage;
165
166  /**
167   * Starts a new ability.
168   *
169   * @param { Want } want - Indicates the ability to start.
170   * @param { AsyncCallback<void> } callback - The callback of startAbility.
171   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
172   * @throws { BusinessError } 16000001 - The specified ability does not exist.
173   * @throws { BusinessError } 16000002 - Incorrect ability type.
174   * @throws { BusinessError } 16000004 - Can not start invisible component.
175   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
176   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
177   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
178   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
179   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
180   * @throws { BusinessError } 16000011 - The context does not exist.
181   * @throws { BusinessError } 16000050 - Internal error.
182   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
183   * @throws { BusinessError } 16000055 - Installation-free timed out.
184   * @throws { BusinessError } 16200001 - The caller has been released.
185   * @syscap SystemCapability.Ability.AbilityRuntime.Core
186   * @stagemodelonly
187   * @since 9
188   */
189  /**
190   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
191   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
192   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
193   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
194   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
195   *
196   * @param { Want } want - Indicates the ability to start.
197   * @param { AsyncCallback<void> } callback - The callback of startAbility.
198   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
199   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
200   * @throws { BusinessError } 16000001 - The specified ability does not exist.
201   * @throws { BusinessError } 16000002 - Incorrect ability type.
202   * @throws { BusinessError } 16000004 - Can not start invisible component.
203   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
204   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
205   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
206   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
207   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
208   * @throws { BusinessError } 16000011 - The context does not exist.
209   * @throws { BusinessError } 16000012 - The application is controlled.
210   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
211   * @throws { BusinessError } 16000050 - Internal error.
212   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
213   * @throws { BusinessError } 16000055 - Installation-free timed out.
214   * @throws { BusinessError } 16200001 - The caller has been released.
215   * @syscap SystemCapability.Ability.AbilityRuntime.Core
216   * @stagemodelonly
217   * @crossplatform
218   * @since 10
219   */
220  /**
221   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
222   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
223   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
224   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
225   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
226   *
227   * @param { Want } want - Indicates the ability to start.
228   * @param { AsyncCallback<void> } callback - The callback of startAbility.
229   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
230   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
231   * @throws { BusinessError } 16000001 - The specified ability does not exist.
232   * @throws { BusinessError } 16000002 - Incorrect ability type.
233   * @throws { BusinessError } 16000004 - Can not start invisible component.
234   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
235   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
236   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
237   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
238   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
239   * @throws { BusinessError } 16000011 - The context does not exist.
240   * @throws { BusinessError } 16000012 - The application is controlled.
241   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
242   * @throws { BusinessError } 16000050 - Internal error.
243   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
244   * @throws { BusinessError } 16000055 - Installation-free timed out.
245   * @throws { BusinessError } 16200001 - The caller has been released.
246   * @syscap SystemCapability.Ability.AbilityRuntime.Core
247   * @stagemodelonly
248   * @crossplatform
249   * @atomicservice
250   * @since 11
251   */
252  /**
253   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
254   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
255   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
256   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
257   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
258   *
259   * @param { Want } want - Indicates the ability to start.
260   * @param { AsyncCallback<void> } callback - The callback of startAbility.
261   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
262   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
263   * @throws { BusinessError } 16000001 - The specified ability does not exist.
264   * @throws { BusinessError } 16000002 - Incorrect ability type.
265   * @throws { BusinessError } 16000004 - Can not start invisible component.
266   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
267   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
268   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
269   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
270   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
271   * @throws { BusinessError } 16000011 - The context does not exist.
272   * @throws { BusinessError } 16000012 - The application is controlled.
273   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
274   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
275   * @throws { BusinessError } 16000019 - Can not match any component.
276   * @throws { BusinessError } 16000050 - Internal error.
277   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
278   * @throws { BusinessError } 16000055 - Installation-free timed out.
279   * @throws { BusinessError } 16200001 - The caller has been released.
280   * @throws { BusinessError } 16000073 - The app clone index is invalid.
281   * @syscap SystemCapability.Ability.AbilityRuntime.Core
282   * @stagemodelonly
283   * @crossplatform
284   * @atomicservice
285   * @since 12
286   */
287  startAbility(want: Want, callback: AsyncCallback<void>): void;
288
289  /**
290   * Starts a new ability.
291   *
292   * @param { Want } want - Indicates the ability to start.
293   * @param { StartOptions } options - Indicates the start options.
294   * @param { AsyncCallback<void> } callback - The callback of startAbility.
295   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
296   * @throws { BusinessError } 16000001 - The specified ability does not exist.
297   * @throws { BusinessError } 16000002 - Incorrect ability type.
298   * @throws { BusinessError } 16000004 - Can not start invisible component.
299   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
300   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
301   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
302   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
303   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
304   * @throws { BusinessError } 16000011 - The context does not exist.
305   * @throws { BusinessError } 16000050 - Internal error.
306   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
307   * @throws { BusinessError } 16000055 - Installation-free timed out.
308   * @throws { BusinessError } 16200001 - The caller has been released.
309   * @syscap SystemCapability.Ability.AbilityRuntime.Core
310   * @stagemodelonly
311   * @since 9
312   */
313  /**
314   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
315   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
316   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
317   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
318   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
319   *
320   * @param { Want } want - Indicates the ability to start.
321   * @param { StartOptions } options - Indicates the start options.
322   * @param { AsyncCallback<void> } callback - The callback of startAbility.
323   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
324   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
325   * @throws { BusinessError } 16000001 - The specified ability does not exist.
326   * @throws { BusinessError } 16000004 - Can not start invisible component.
327   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
328   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
329   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
330   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
331   * @throws { BusinessError } 16000011 - The context does not exist.
332   * @throws { BusinessError } 16000012 - The application is controlled.
333   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
334   * @throws { BusinessError } 16000050 - Internal error.
335   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
336   * @throws { BusinessError } 16000055 - Installation-free timed out.
337   * @throws { BusinessError } 16200001 - The caller has been released.
338   * @syscap SystemCapability.Ability.AbilityRuntime.Core
339   * @stagemodelonly
340   * @since 10
341   */
342  /**
343   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
344   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
345   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
346   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
347   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
348   *
349   * @param { Want } want - Indicates the ability to start.
350   * @param { StartOptions } options - Indicates the start options.
351   * @param { AsyncCallback<void> } callback - The callback of startAbility.
352   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
353   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
354   * @throws { BusinessError } 16000001 - The specified ability does not exist.
355   * @throws { BusinessError } 16000004 - Can not start invisible component.
356   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
357   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
358   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
359   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
360   * @throws { BusinessError } 16000011 - The context does not exist.
361   * @throws { BusinessError } 16000012 - The application is controlled.
362   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
363   * @throws { BusinessError } 16000050 - Internal error.
364   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
365   * @throws { BusinessError } 16000055 - Installation-free timed out.
366   * @throws { BusinessError } 16200001 - The caller has been released.
367   * @syscap SystemCapability.Ability.AbilityRuntime.Core
368   * @stagemodelonly
369   * @atomicservice
370   * @since 11
371   */
372  /**
373   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
374   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
375   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
376   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
377   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
378   *
379   * @param { Want } want - Indicates the ability to start.
380   * @param { StartOptions } options - Indicates the start options.
381   * @param { AsyncCallback<void> } callback - The callback of startAbility.
382   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
383   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
384   * @throws { BusinessError } 801 - Capability not support.
385   * @throws { BusinessError } 16000001 - The specified ability does not exist.
386   * @throws { BusinessError } 16000004 - Can not start invisible component.
387   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
388   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
389   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
390   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
391   * @throws { BusinessError } 16000011 - The context does not exist.
392   * @throws { BusinessError } 16000012 - The application is controlled.
393   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
394   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
395   * @throws { BusinessError } 16000019 - Can not match any component.
396   * @throws { BusinessError } 16000050 - Internal error.
397   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
398   * @throws { BusinessError } 16000055 - Installation-free timed out.
399   * @throws { BusinessError } 16000067 - Start options check failed.
400   * @throws { BusinessError } 16000068 - Ability already running.
401   * @throws { BusinessError } 16200001 - The caller has been released.
402   * @throws { BusinessError } 16300003 - The target application is not self application.
403   * @throws { BusinessError } 16000073 - The app clone index is invalid.
404   * @syscap SystemCapability.Ability.AbilityRuntime.Core
405   * @stagemodelonly
406   * @atomicservice
407   * @since 12
408   */
409  startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
410
411  /**
412   * Starts a new ability.
413   *
414   * @param { Want } want - Indicates the ability to start.
415   * @param { StartOptions } [options] - Indicates the start options.
416   * @returns { Promise<void> } The promise returned by the function.
417   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
418   * @throws { BusinessError } 16000001 - The specified ability does not exist.
419   * @throws { BusinessError } 16000002 - Incorrect ability type.
420   * @throws { BusinessError } 16000004 - Can not start invisible component.
421   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
422   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
423   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
424   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
425   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
426   * @throws { BusinessError } 16000011 - The context does not exist.
427   * @throws { BusinessError } 16000050 - Internal error.
428   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
429   * @throws { BusinessError } 16000055 - Installation-free timed out.
430   * @throws { BusinessError } 16200001 - The caller has been released.
431   * @syscap SystemCapability.Ability.AbilityRuntime.Core
432   * @stagemodelonly
433   * @crossplatform
434   * @since 9
435   */
436  /**
437   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
438   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
439   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
440   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
441   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
442   *
443   * @param { Want } want - Indicates the ability to start.
444   * @param { StartOptions } [options] - Indicates the start options.
445   * @returns { Promise<void> } The promise returned by the function.
446   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
447   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
448   * @throws { BusinessError } 16000001 - The specified ability does not exist.
449   * @throws { BusinessError } 16000002 - Incorrect ability type.
450   * @throws { BusinessError } 16000004 - Can not start invisible component.
451   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
452   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
453   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
454   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
455   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
456   * @throws { BusinessError } 16000011 - The context does not exist.
457   * @throws { BusinessError } 16000012 - The application is controlled.
458   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
459   * @throws { BusinessError } 16000050 - Internal error.
460   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
461   * @throws { BusinessError } 16000055 - Installation-free timed out.
462   * @throws { BusinessError } 16200001 - The caller has been released.
463   * @syscap SystemCapability.Ability.AbilityRuntime.Core
464   * @stagemodelonly
465   * @since 10
466   */
467  /**
468   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
469   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
470   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
471   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
472   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
473   *
474   * @param { Want } want - Indicates the ability to start.
475   * @param { StartOptions } [options] - Indicates the start options.
476   * @returns { Promise<void> } The promise returned by the function.
477   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
478   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
479   * @throws { BusinessError } 16000001 - The specified ability does not exist.
480   * @throws { BusinessError } 16000002 - Incorrect ability type.
481   * @throws { BusinessError } 16000004 - Can not start invisible component.
482   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
483   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
484   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
485   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
486   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
487   * @throws { BusinessError } 16000011 - The context does not exist.
488   * @throws { BusinessError } 16000012 - The application is controlled.
489   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
490   * @throws { BusinessError } 16000050 - Internal error.
491   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
492   * @throws { BusinessError } 16000055 - Installation-free timed out.
493   * @throws { BusinessError } 16200001 - The caller has been released.
494   * @syscap SystemCapability.Ability.AbilityRuntime.Core
495   * @stagemodelonly
496   * @atomicservice
497   * @since 11
498   */
499  /**
500   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
501   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
502   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
503   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
504   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
505   *
506   * @param { Want } want - Indicates the ability to start.
507   * @param { StartOptions } [options] - Indicates the start options.
508   * @returns { Promise<void> } The promise returned by the function.
509   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
510   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
511   * @throws { BusinessError } 801 - Capability not support.
512   * @throws { BusinessError } 16000001 - The specified ability does not exist.
513   * @throws { BusinessError } 16000002 - Incorrect ability type.
514   * @throws { BusinessError } 16000004 - Can not start invisible component.
515   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
516   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
517   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
518   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
519   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
520   * @throws { BusinessError } 16000011 - The context does not exist.
521   * @throws { BusinessError } 16000012 - The application is controlled.
522   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
523   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
524   * @throws { BusinessError } 16000019 - Can not match any component.
525   * @throws { BusinessError } 16000050 - Internal error.
526   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
527   * @throws { BusinessError } 16000055 - Installation-free timed out.
528   * @throws { BusinessError } 16000067 - Start options check failed.
529   * @throws { BusinessError } 16000068 - Ability already running.
530   * @throws { BusinessError } 16200001 - The caller has been released.
531   * @throws { BusinessError } 16300003 - The target application is not self application.
532   * @throws { BusinessError } 16000073 - The app clone index is invalid.
533   * @syscap SystemCapability.Ability.AbilityRuntime.Core
534   * @stagemodelonly
535   * @atomicservice
536   * @since 12
537   */
538  startAbility(want: Want, options?: StartOptions): Promise<void>;
539
540  /**
541   * Starts a new ability by implicit want. If the caller application is in foreground, you can use this method to start ability;
542   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
543   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
544   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
545   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
546   *
547   * @param { string } link - Indicates the ability to start.
548   * @param { OpenLinkOptions } [options] - Indicates the open link options.
549   * @param { AsyncCallback<AbilityResult> } [callback] - The callback is used to return the ability result.
550   * @returns { Promise<void> } The promise returned by the function.
551   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
552   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
553   * @throws { BusinessError } 16000001 - The specified ability does not exist.
554   * @throws { BusinessError } 16000002 - Incorrect ability type.
555   * @throws { BusinessError } 16000004 - Can not start invisible component.
556   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
557   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
558   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
559   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
560   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
561   * @throws { BusinessError } 16000011 - The context does not exist.
562   * @throws { BusinessError } 16000012 - The application is controlled.
563   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
564   * @throws { BusinessError } 16000019 - Can not match any component.
565   * @throws { BusinessError } 16200001 - The caller has been released.
566   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
567   * @syscap SystemCapability.Ability.AbilityRuntime.Core
568   * @stagemodelonly
569   * @atomicservice
570   * @since 12
571   */
572  openLink(link: string, options?: OpenLinkOptions, callback?: AsyncCallback<AbilityResult>): Promise<void>;
573
574  /**
575   * Starts a new ability using the original caller information. If the caller application is in foreground,
576   * you can use this method to start ability; If the caller application is in the background,
577   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
578   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
579   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
580   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
581   *
582   * @param { Want } want - Indicates the ability to start.
583   * @param { AsyncCallback<void> } callback - The callback of startAbility.
584   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
585   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
586   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified;
587   * 2. Incorrect parameter types; 3. Parameter verification failed.
588   * @throws { BusinessError } 16000001 - The specified ability does not exist.
589   * @throws { BusinessError } 16000002 - Incorrect ability type.
590   * @throws { BusinessError } 16000004 - Can not start invisible component.
591   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
592   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
593   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
594   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
595   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
596   * @throws { BusinessError } 16000011 - The context does not exist.
597   * @throws { BusinessError } 16000012 - The application is controlled.
598   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
599   * @throws { BusinessError } 16000050 - Internal error.
600   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
601   * @throws { BusinessError } 16000055 - Installation-free timed out.
602   * @throws { BusinessError } 16200001 - The caller has been released.
603   * @syscap SystemCapability.Ability.AbilityRuntime.Core
604   * @systemapi
605   * @stagemodelonly
606   * @since 10
607   */
608  /**
609   * Starts a new ability using the original caller information. If the caller application is in foreground,
610   * you can use this method to start ability; If the caller application is in the background,
611   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
612   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
613   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
614   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
615   *
616   * @param { Want } want - Indicates the ability to start.
617   * @param { AsyncCallback<void> } callback - The callback of startAbility.
618   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
619   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
620   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
621   * 2. Incorrect parameter types; 3. Parameter verification failed.
622   * @throws { BusinessError } 16000001 - The specified ability does not exist.
623   * @throws { BusinessError } 16000002 - Incorrect ability type.
624   * @throws { BusinessError } 16000004 - Can not start invisible component.
625   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
626   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
627   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
628   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
629   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
630   * @throws { BusinessError } 16000011 - The context does not exist.
631   * @throws { BusinessError } 16000012 - The application is controlled.
632   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
633   * @throws { BusinessError } 16000050 - Internal error.
634   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
635   * @throws { BusinessError } 16000055 - Installation-free timed out.
636   * @throws { BusinessError } 16200001 - The caller has been released.
637   * @throws { BusinessError } 16000073 - The app clone index is invalid.
638   * @syscap SystemCapability.Ability.AbilityRuntime.Core
639   * @systemapi
640   * @stagemodelonly
641   * @since 12
642   */
643  startAbilityAsCaller(want: Want, callback: AsyncCallback<void>): void;
644
645  /**
646   * Starts a new ability using the original caller information. If the caller application is in foreground,
647   * you can use this method to start ability; If the caller application is in the background,
648   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
649   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
650   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
651   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
652   *
653   * @param { Want } want - Indicates the ability to start.
654   * @param { StartOptions } options - Indicates the start options.
655   * @param { AsyncCallback<void> } callback - The callback of startAbility.
656   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
657   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
658   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified;
659   * 2. Incorrect parameter types; 3. Parameter verification failed.
660   * @throws { BusinessError } 16000001 - The specified ability does not exist.
661   * @throws { BusinessError } 16000004 - Can not start invisible component.
662   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
663   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
664   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
665   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
666   * @throws { BusinessError } 16000011 - The context does not exist.
667   * @throws { BusinessError } 16000012 - The application is controlled.
668   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
669   * @throws { BusinessError } 16000050 - Internal error.
670   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
671   * @throws { BusinessError } 16000055 - Installation-free timed out.
672   * @throws { BusinessError } 16200001 - The caller has been released.
673   * @syscap SystemCapability.Ability.AbilityRuntime.Core
674   * @systemapi
675   * @stagemodelonly
676   * @since 10
677   */
678  /**
679   * Starts a new ability using the original caller information. If the caller application is in foreground,
680   * you can use this method to start ability; If the caller application is in the background,
681   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
682   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
683   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
684   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
685   *
686   * @param { Want } want - Indicates the ability to start.
687   * @param { StartOptions } options - Indicates the start options.
688   * @param { AsyncCallback<void> } callback - The callback of startAbility.
689   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
690   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
691   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
692   * 2. Incorrect parameter types; 3. Parameter verification failed.
693   * @throws { BusinessError } 16000001 - The specified ability does not exist.
694   * @throws { BusinessError } 16000004 - Can not start invisible component.
695   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
696   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
697   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
698   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
699   * @throws { BusinessError } 16000011 - The context does not exist.
700   * @throws { BusinessError } 16000012 - The application is controlled.
701   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
702   * @throws { BusinessError } 16000050 - Internal error.
703   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
704   * @throws { BusinessError } 16000055 - Installation-free timed out.
705   * @throws { BusinessError } 16200001 - The caller has been released.
706   * @throws { BusinessError } 16000073 - The app clone index is invalid.
707   * @syscap SystemCapability.Ability.AbilityRuntime.Core
708   * @systemapi
709   * @stagemodelonly
710   * @since 12
711   */
712  startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
713
714  /**
715   * Starts a new ability using the original caller information. If the caller application is in foreground,
716   * you can use this method to start ability; If the caller application is in the background,
717   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
718   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
719   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
720   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
721   *
722   * @param { Want } want - Indicates the ability to start.
723   * @param { StartOptions } options - Indicates the start options.
724   * @returns { Promise<void> } The promise returned by the function.
725   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
726   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
727   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
728   * 2. Incorrect parameter types; 3. Parameter verification failed.
729   * @throws { BusinessError } 16000001 - The specified ability does not exist.
730   * @throws { BusinessError } 16000002 - Incorrect ability type.
731   * @throws { BusinessError } 16000004 - Can not start invisible component.
732   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
733   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
734   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
735   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
736   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
737   * @throws { BusinessError } 16000011 - The context does not exist.
738   * @throws { BusinessError } 16000012 - The application is controlled.
739   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
740   * @throws { BusinessError } 16000050 - Internal error.
741   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
742   * @throws { BusinessError } 16000055 - Installation-free timed out.
743   * @throws { BusinessError } 16200001 - The caller has been released.
744   * @syscap SystemCapability.Ability.AbilityRuntime.Core
745   * @systemapi
746   * @stagemodelonly
747   * @since 10
748   */
749  /**
750   * Starts a new ability using the original caller information. If the caller application is in foreground,
751   * you can use this method to start ability; If the caller application is in the background,
752   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
753   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
754   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
755   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
756   *
757   * @param { Want } want - Indicates the ability to start.
758   * @param { StartOptions } options - Indicates the start options.
759   * @returns { Promise<void> } The promise returned by the function.
760   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
761   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
762   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
763   * 2. Incorrect parameter types; 3. Parameter verification failed.
764   * @throws { BusinessError } 16000001 - The specified ability does not exist.
765   * @throws { BusinessError } 16000002 - Incorrect ability type.
766   * @throws { BusinessError } 16000004 - Can not start invisible component.
767   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
768   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
769   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
770   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
771   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
772   * @throws { BusinessError } 16000011 - The context does not exist.
773   * @throws { BusinessError } 16000012 - The application is controlled.
774   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
775   * @throws { BusinessError } 16000050 - Internal error.
776   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
777   * @throws { BusinessError } 16000055 - Installation-free timed out.
778   * @throws { BusinessError } 16200001 - The caller has been released.
779   * @throws { BusinessError } 16000073 - The app clone index is invalid.
780   * @syscap SystemCapability.Ability.AbilityRuntime.Core
781   * @systemapi
782   * @stagemodelonly
783   * @since 12
784   */
785  startAbilityAsCaller(want: Want, options?: StartOptions): Promise<void>;
786
787  /**
788   * Get the caller object of the startup capability.
789   *
790   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
791   * @param { Want } want - Indicates the ability to start.
792   * @returns { Promise<Caller> } Returns the Caller interface.
793   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
794   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
795   * @throws { BusinessError } 16000001 - The specified ability does not exist.
796   * @throws { BusinessError } 16000002 - Incorrect ability type.
797   * @throws { BusinessError } 16000004 - Can not start invisible component.
798   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
799   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
800   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
801   * @throws { BusinessError } 16000011 - The context does not exist.
802   * @throws { BusinessError } 16000050 - Internal error.
803   * @throws { BusinessError } 16200001 - The caller has been released.
804   * @syscap SystemCapability.Ability.AbilityRuntime.Core
805   * @stagemodelonly
806   * @since 9
807   */
808  /**
809   * Get the caller object of the startup capability.
810   * If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION to use this method.
811   * If the caller application is in foreground, you can use this method to start ability;
812   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
813   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
814   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
815   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
816   *
817   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
818   * @param { Want } want - Indicates the ability to start.
819   * @returns { Promise<Caller> } Returns the Caller interface.
820   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
821   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
822   * @throws { BusinessError } 16000001 - The specified ability does not exist.
823   * @throws { BusinessError } 16000002 - Incorrect ability type.
824   * @throws { BusinessError } 16000004 - Can not start invisible component.
825   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
826   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
827   * @throws { BusinessError } 16000011 - The context does not exist.
828   * @throws { BusinessError } 16000012 - The application is controlled.
829   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
830   * @throws { BusinessError } 16000050 - Internal error.
831   * @syscap SystemCapability.Ability.AbilityRuntime.Core
832   * @stagemodelonly
833   * @since 10
834   */
835  /**
836   * Get the caller object of the startup capability in cross-device.
837   *
838   * If the caller application is in foreground, you can use this method to start ability;
839   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
840   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
841   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
842   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
843   *
844   * @permission ohos.permission.DISTRIBUTED_DATASYNC
845   * @param { Want } want - Indicates the ability to start.
846   * @returns { Promise<Caller> } Returns the Caller interface.
847   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
848   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
849   * @throws { BusinessError } 16000001 - The specified ability does not exist.
850   * @throws { BusinessError } 16000002 - Incorrect ability type.
851   * @throws { BusinessError } 16000004 - Can not start invisible component.
852   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
853   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
854   * @throws { BusinessError } 16000011 - The context does not exist.
855   * @throws { BusinessError } 16000012 - The application is controlled.
856   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
857   * @throws { BusinessError } 16000050 - Internal error.
858   * @syscap SystemCapability.Ability.AbilityRuntime.Core
859   * @stagemodelonly
860   * @since 11
861   */
862  /**
863   * Get the caller object of the startup capability in cross-device.
864   *
865   * If the caller application is in foreground, you can use this method to start ability;
866   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
867   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
868   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
869   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
870   *
871   * @permission ohos.permission.DISTRIBUTED_DATASYNC
872   * @param { Want } want - Indicates the ability to start.
873   * @returns { Promise<Caller> } Returns the Caller interface.
874   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
875   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
876   * @throws { BusinessError } 16000001 - The specified ability does not exist.
877   * @throws { BusinessError } 16000002 - Incorrect ability type.
878   * @throws { BusinessError } 16000004 - Can not start invisible component.
879   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
880   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
881   * @throws { BusinessError } 16000011 - The context does not exist.
882   * @throws { BusinessError } 16000012 - The application is controlled.
883   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
884   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
885   * @throws { BusinessError } 16000050 - Internal error.
886   * @throws { BusinessError } 16000073 - The app clone index is invalid.
887   * @syscap SystemCapability.Ability.AbilityRuntime.Core
888   * @stagemodelonly
889   * @since 12
890   */
891  startAbilityByCall(want: Want): Promise<Caller>;
892
893  /**
894   * Get the caller object that specifies the accountId startup capability
895   * If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
896   * and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS to use this method.
897   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
898   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
899   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
900   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
901   *
902   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
903   * @param { Want } want - Indicates the ability to start.
904   * @param { number } accountId - Indicates the account to start.
905   * @returns { Promise<Caller> } Returns the Caller interface.
906   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
907   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
908   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
909   * @throws { BusinessError } 16000001 - The specified ability does not exist.
910   * @throws { BusinessError } 16000002 - Incorrect ability type.
911   * @throws { BusinessError } 16000004 - Can not start invisible component.
912   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
913   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
914   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
915   * @throws { BusinessError } 16000011 - The context does not exist.
916   * @throws { BusinessError } 16000012 - The application is controlled.
917   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
918   * @throws { BusinessError } 16000050 - Internal error.
919   * @throws { BusinessError } 16200001 - The caller has been released.
920   * @syscap SystemCapability.Ability.AbilityRuntime.Core
921   * @systemapi
922   * @stagemodelonly
923   * @since 10
924   */
925  /**
926   * Get the caller object that specifies the accountId startup capability
927   * If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
928   * and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS to use this method.
929   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
930   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
931   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
932   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
933   *
934   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
935   * @param { Want } want - Indicates the ability to start.
936   * @param { number } accountId - Indicates the account to start.
937   * @returns { Promise<Caller> } Returns the Caller interface.
938   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
939   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
940   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
941   * @throws { BusinessError } 16000001 - The specified ability does not exist.
942   * @throws { BusinessError } 16000002 - Incorrect ability type.
943   * @throws { BusinessError } 16000004 - Can not start invisible component.
944   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
945   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
946   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
947   * @throws { BusinessError } 16000011 - The context does not exist.
948   * @throws { BusinessError } 16000012 - The application is controlled.
949   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
950   * @throws { BusinessError } 16000050 - Internal error.
951   * @throws { BusinessError } 16200001 - The caller has been released.
952   * @throws { BusinessError } 16000073 - The app clone index is invalid.
953   * @syscap SystemCapability.Ability.AbilityRuntime.Core
954   * @systemapi
955   * @stagemodelonly
956   * @since 12
957   */
958  startAbilityByCallWithAccount(want: Want, accountId: number): Promise<Caller>;
959
960  /**
961   * Starts a new ability with account. If the caller application is in foreground,
962   * you can use this method to start ability; If the caller application is in the background,
963   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
964   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
965   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
966   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
967   *
968   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
969   * @param { Want } want - Indicates the want info to start.
970   * @param { number } accountId - Indicates the account to start.
971   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
972   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
973   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
974   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
975   * @throws { BusinessError } 16000001 - The specified ability does not exist.
976   * @throws { BusinessError } 16000002 - Incorrect ability type.
977   * @throws { BusinessError } 16000004 - Can not start invisible component.
978   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
979   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
980   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
981   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
982   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
983   * @throws { BusinessError } 16000011 - The context does not exist.
984   * @throws { BusinessError } 16000012 - The application is controlled.
985   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
986   * @throws { BusinessError } 16000050 - Internal error.
987   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
988   * @throws { BusinessError } 16000055 - Installation-free timed out.
989   * @throws { BusinessError } 16200001 - The caller has been released.
990   * @syscap SystemCapability.Ability.AbilityRuntime.Core
991   * @systemapi
992   * @stagemodelonly
993   * @since 9
994   */
995  /**
996   * Starts a new ability with account. If the caller application is in foreground,
997   * you can use this method to start ability; If the caller application is in the background,
998   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
999   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1000   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1001   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1002   *
1003   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1004   * @param { Want } want - Indicates the want info to start.
1005   * @param { number } accountId - Indicates the account to start.
1006   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
1007   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1008   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1009   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1010   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1011   * @throws { BusinessError } 16000002 - Incorrect ability type.
1012   * @throws { BusinessError } 16000004 - Can not start invisible component.
1013   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1014   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1015   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1016   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1017   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1018   * @throws { BusinessError } 16000011 - The context does not exist.
1019   * @throws { BusinessError } 16000012 - The application is controlled.
1020   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1021   * @throws { BusinessError } 16000019 - Can not match any component.
1022   * @throws { BusinessError } 16000050 - Internal error.
1023   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1024   * @throws { BusinessError } 16000055 - Installation-free timed out.
1025   * @throws { BusinessError } 16200001 - The caller has been released.
1026   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1027   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1028   * @systemapi
1029   * @stagemodelonly
1030   * @since 12
1031   */
1032  startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
1033
1034  /**
1035   * Starts a new ability with account.
1036   *
1037   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1038   * @param { Want } want - Indicates the want info to start.
1039   * @param { number } accountId - Indicates the account to start.
1040   * @param { StartOptions } options - Indicates the start options.
1041   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
1042   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1043   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1044   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1045   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1046   * @throws { BusinessError } 16000002 - Incorrect ability type.
1047   * @throws { BusinessError } 16000004 - Can not start invisible component.
1048   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1049   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1050   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1051   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1052   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1053   * @throws { BusinessError } 16000011 - The context does not exist.
1054   * @throws { BusinessError } 16000050 - Internal error.
1055   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1056   * @throws { BusinessError } 16000055 - Installation-free timed out.
1057   * @throws { BusinessError } 16200001 - The caller has been released.
1058   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1059   * @systemapi
1060   * @stagemodelonly
1061   * @since 9
1062   */
1063  /**
1064   * Starts a new ability with account. If the caller application is in foreground,
1065   * you can use this method to start ability; If the caller application is in the background,
1066   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1067   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1068   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1069   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1070   *
1071   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1072   * @param { Want } want - Indicates the want info to start.
1073   * @param { number } accountId - Indicates the account to start.
1074   * @param { StartOptions } options - Indicates the start options.
1075   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
1076   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1077   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1078   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1079   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1080   * @throws { BusinessError } 16000004 - Can not start invisible component.
1081   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1082   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1083   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1084   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1085   * @throws { BusinessError } 16000011 - The context does not exist.
1086   * @throws { BusinessError } 16000012 - The application is controlled.
1087   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1088   * @throws { BusinessError } 16000050 - Internal error.
1089   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1090   * @throws { BusinessError } 16000055 - Installation-free timed out.
1091   * @throws { BusinessError } 16200001 - The caller has been released.
1092   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1093   * @systemapi
1094   * @stagemodelonly
1095   * @since 10
1096   */
1097  /**
1098   * Starts a new ability with account. If the caller application is in foreground,
1099   * you can use this method to start ability; If the caller application is in the background,
1100   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1101   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1102   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1103   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1104   *
1105   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1106   * @param { Want } want - Indicates the want info to start.
1107   * @param { number } accountId - Indicates the account to start.
1108   * @param { StartOptions } options - Indicates the start options.
1109   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
1110   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1111   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1112   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1113   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1114   * @throws { BusinessError } 16000004 - Can not start invisible component.
1115   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1116   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1117   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1118   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1119   * @throws { BusinessError } 16000011 - The context does not exist.
1120   * @throws { BusinessError } 16000012 - The application is controlled.
1121   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1122   * @throws { BusinessError } 16000019 - Can not match any component.
1123   * @throws { BusinessError } 16000050 - Internal error.
1124   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1125   * @throws { BusinessError } 16000055 - Installation-free timed out.
1126   * @throws { BusinessError } 16200001 - The caller has been released.
1127   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1128   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1129   * @systemapi
1130   * @stagemodelonly
1131   * @since 12
1132   */
1133  startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback<void>): void;
1134
1135  /**
1136   * Starts a new ability with account. If the caller application is in foreground,
1137   * you can use this method to start ability; If the caller application is in the background,
1138   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1139   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1140   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1141   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1142   *
1143   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1144   * @param { Want } want - Indicates the want info to start.
1145   * @param { number } accountId - Indicates the account to start.
1146   * @param { StartOptions } [options] - Indicates the start options.
1147   * @returns { Promise<void> } The promise returned by the function.
1148   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1149   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1150   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1151   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1152   * @throws { BusinessError } 16000002 - Incorrect ability type.
1153   * @throws { BusinessError } 16000004 - Can not start invisible component.
1154   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1155   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1156   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1157   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1158   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1159   * @throws { BusinessError } 16000011 - The context does not exist.
1160   * @throws { BusinessError } 16000012 - The application is controlled.
1161   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1162   * @throws { BusinessError } 16000050 - Internal error.
1163   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1164   * @throws { BusinessError } 16000055 - Installation-free timed out.
1165   * @throws { BusinessError } 16200001 - The caller has been released.
1166   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1167   * @systemapi
1168   * @stagemodelonly
1169   * @since 9
1170   */
1171  /**
1172   * Starts a new ability with account. If the caller application is in foreground,
1173   * you can use this method to start ability; If the caller application is in the background,
1174   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1175   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1176   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1177   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1178   *
1179   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1180   * @param { Want } want - Indicates the want info to start.
1181   * @param { number } accountId - Indicates the account to start.
1182   * @param { StartOptions } [options] - Indicates the start options.
1183   * @returns { Promise<void> } The promise returned by the function.
1184   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1185   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1186   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1187   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1188   * @throws { BusinessError } 16000002 - Incorrect ability type.
1189   * @throws { BusinessError } 16000004 - Can not start invisible component.
1190   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1191   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1192   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1193   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1194   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1195   * @throws { BusinessError } 16000011 - The context does not exist.
1196   * @throws { BusinessError } 16000012 - The application is controlled.
1197   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1198   * @throws { BusinessError } 16000019 - Can not match any component.
1199   * @throws { BusinessError } 16000050 - Internal error.
1200   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1201   * @throws { BusinessError } 16000055 - Installation-free timed out.
1202   * @throws { BusinessError } 16200001 - The caller has been released.
1203   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1204   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1205   * @systemapi
1206   * @stagemodelonly
1207   * @since 12
1208   */
1209  startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise<void>;
1210
1211  /**
1212   * Starts an ability and returns the execution result when the ability is destroyed.
1213   *
1214   * @param { Want } want - Indicates the ability to start.
1215   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1216   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1217   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1218   * @throws { BusinessError } 16000002 - Incorrect ability type.
1219   * @throws { BusinessError } 16000004 - Can not start invisible component.
1220   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1221   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1222   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1223   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1224   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1225   * @throws { BusinessError } 16000011 - The context does not exist.
1226   * @throws { BusinessError } 16000050 - Internal error.
1227   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1228   * @throws { BusinessError } 16000055 - Installation-free timed out.
1229   * @throws { BusinessError } 16200001 - The caller has been released.
1230   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1231   * @stagemodelonly
1232   * @since 9
1233   */
1234  /**
1235   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1236   * you can use this method to start ability; If the caller application is in the background,
1237   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1238   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1239   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1240   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1241   *
1242   * @param { Want } want - Indicates the ability to start.
1243   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1244   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1245   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1246   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1247   * @throws { BusinessError } 16000002 - Incorrect ability type.
1248   * @throws { BusinessError } 16000004 - Can not start invisible component.
1249   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1250   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1251   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1252   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1253   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1254   * @throws { BusinessError } 16000011 - The context does not exist.
1255   * @throws { BusinessError } 16000012 - The application is controlled.
1256   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1257   * @throws { BusinessError } 16000050 - Internal error.
1258   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1259   * @throws { BusinessError } 16000055 - Installation-free timed out.
1260   * @throws { BusinessError } 16200001 - The caller has been released.
1261   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1262   * @stagemodelonly
1263   * @since 10
1264   */
1265  /**
1266   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1267   * you can use this method to start ability; If the caller application is in the background,
1268   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1269   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1270   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1271   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1272   *
1273   * @param { Want } want - Indicates the ability to start.
1274   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1275   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1276   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1277   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1278   * @throws { BusinessError } 16000002 - Incorrect ability type.
1279   * @throws { BusinessError } 16000004 - Can not start invisible component.
1280   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1281   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1282   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1283   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1284   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1285   * @throws { BusinessError } 16000011 - The context does not exist.
1286   * @throws { BusinessError } 16000012 - The application is controlled.
1287   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1288   * @throws { BusinessError } 16000050 - Internal error.
1289   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1290   * @throws { BusinessError } 16000055 - Installation-free timed out.
1291   * @throws { BusinessError } 16200001 - The caller has been released.
1292   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1293   * @stagemodelonly
1294   * @atomicservice
1295   * @since 11
1296   */
1297  /**
1298   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1299   * you can use this method to start ability; If the caller application is in the background,
1300   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1301   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1302   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1303   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1304   *
1305   * @param { Want } want - Indicates the ability to start.
1306   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1307   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1308   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1309   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1310   * @throws { BusinessError } 16000002 - Incorrect ability type.
1311   * @throws { BusinessError } 16000004 - Can not start invisible component.
1312   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1313   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1314   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1315   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1316   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1317   * @throws { BusinessError } 16000011 - The context does not exist.
1318   * @throws { BusinessError } 16000012 - The application is controlled.
1319   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1320   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
1321   * @throws { BusinessError } 16000019 - Can not match any component.
1322   * @throws { BusinessError } 16000050 - Internal error.
1323   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1324   * @throws { BusinessError } 16000055 - Installation-free timed out.
1325   * @throws { BusinessError } 16200001 - The caller has been released.
1326   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1327   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1328   * @stagemodelonly
1329   * @atomicservice
1330   * @since 12
1331   */
1332  startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): void;
1333
1334  /**
1335   * Starts an ability and returns the execution result when the ability is destroyed.
1336   *
1337   * @param { Want } want - Indicates the ability to start.
1338   * @param { StartOptions } options - Indicates the start options.
1339   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1340   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1341   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1342   * @throws { BusinessError } 16000002 - Incorrect ability type.
1343   * @throws { BusinessError } 16000004 - Can not start invisible component.
1344   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1345   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1346   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1347   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1348   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1349   * @throws { BusinessError } 16000011 - The context does not exist.
1350   * @throws { BusinessError } 16000050 - Internal error.
1351   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1352   * @throws { BusinessError } 16000055 - Installation-free timed out.
1353   * @throws { BusinessError } 16200001 - The caller has been released.
1354   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1355   * @stagemodelonly
1356   * @since 9
1357   */
1358  /**
1359   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1360   * you can use this method to start ability; If the caller application is in the background,
1361   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1362   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1363   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1364   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1365   *
1366   * @param { Want } want - Indicates the ability to start.
1367   * @param { StartOptions } options - Indicates the start options.
1368   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1369   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1370   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1371   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1372   * @throws { BusinessError } 16000004 - Can not start invisible component.
1373   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1374   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1375   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1376   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1377   * @throws { BusinessError } 16000011 - The context does not exist.
1378   * @throws { BusinessError } 16000012 - The application is controlled.
1379   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1380   * @throws { BusinessError } 16000050 - Internal error.
1381   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1382   * @throws { BusinessError } 16000055 - Installation-free timed out.
1383   * @throws { BusinessError } 16200001 - The caller has been released.
1384   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1385   * @stagemodelonly
1386   * @since 10
1387   */
1388  /**
1389   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1390   * you can use this method to start ability; If the caller application is in the background,
1391   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1392   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1393   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1394   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1395   *
1396   * @param { Want } want - Indicates the ability to start.
1397   * @param { StartOptions } options - Indicates the start options.
1398   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1399   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1400   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1401   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1402   * @throws { BusinessError } 16000004 - Can not start invisible component.
1403   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1404   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1405   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1406   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1407   * @throws { BusinessError } 16000011 - The context does not exist.
1408   * @throws { BusinessError } 16000012 - The application is controlled.
1409   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1410   * @throws { BusinessError } 16000050 - Internal error.
1411   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1412   * @throws { BusinessError } 16000055 - Installation-free timed out.
1413   * @throws { BusinessError } 16200001 - The caller has been released.
1414   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1415   * @stagemodelonly
1416   * @atomicservice
1417   * @since 11
1418   */
1419  /**
1420   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1421   * you can use this method to start ability; If the caller application is in the background,
1422   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1423   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1424   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1425   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1426   *
1427   * @param { Want } want - Indicates the ability to start.
1428   * @param { StartOptions } options - Indicates the start options.
1429   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1430   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1431   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1432   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1433   * @throws { BusinessError } 16000004 - Can not start invisible component.
1434   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1435   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1436   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1437   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1438   * @throws { BusinessError } 16000011 - The context does not exist.
1439   * @throws { BusinessError } 16000012 - The application is controlled.
1440   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1441   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
1442   * @throws { BusinessError } 16000019 - Can not match any component.
1443   * @throws { BusinessError } 16000050 - Internal error.
1444   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1445   * @throws { BusinessError } 16000055 - Installation-free timed out.
1446   * @throws { BusinessError } 16200001 - The caller has been released.
1447   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1448   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1449   * @stagemodelonly
1450   * @atomicservice
1451   * @since 12
1452   */
1453  startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback<AbilityResult>): void;
1454
1455  /**
1456   * Starts an ability and returns the execution result when the ability is destroyed.
1457   *
1458   * @param { Want } want - Indicates the ability to start.
1459   * @param { StartOptions } [options] - Indicates the start options.
1460   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
1461   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1462   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1463   * @throws { BusinessError } 16000002 - Incorrect ability type.
1464   * @throws { BusinessError } 16000004 - Can not start invisible component.
1465   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1466   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1467   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1468   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1469   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1470   * @throws { BusinessError } 16000011 - The context does not exist.
1471   * @throws { BusinessError } 16000050 - Internal error.
1472   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1473   * @throws { BusinessError } 16000055 - Installation-free timed out.
1474   * @throws { BusinessError } 16200001 - The caller has been released.
1475   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1476   * @stagemodelonly
1477   * @since 9
1478   */
1479  /**
1480   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1481   * you can use this method to start ability; If the caller application is in the background,
1482   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1483   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1484   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1485   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1486   *
1487   * @param { Want } want - Indicates the ability to start.
1488   * @param { StartOptions } [options] - Indicates the start options.
1489   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
1490   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1491   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1492   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1493   * @throws { BusinessError } 16000002 - Incorrect ability type.
1494   * @throws { BusinessError } 16000004 - Can not start invisible component.
1495   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1496   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1497   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1498   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1499   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1500   * @throws { BusinessError } 16000011 - The context does not exist.
1501   * @throws { BusinessError } 16000012 - The application is controlled.
1502   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1503   * @throws { BusinessError } 16000050 - Internal error.
1504   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1505   * @throws { BusinessError } 16000055 - Installation-free timed out.
1506   * @throws { BusinessError } 16200001 - The caller has been released.
1507   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1508   * @stagemodelonly
1509   * @since 10
1510   */
1511  /**
1512   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1513   * you can use this method to start ability; If the caller application is in the background,
1514   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1515   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1516   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1517   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1518   *
1519   * @param { Want } want - Indicates the ability to start.
1520   * @param { StartOptions } [options] - Indicates the start options.
1521   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
1522   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1523   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1524   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1525   * @throws { BusinessError } 16000002 - Incorrect ability type.
1526   * @throws { BusinessError } 16000004 - Can not start invisible component.
1527   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1528   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1529   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1530   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1531   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1532   * @throws { BusinessError } 16000011 - The context does not exist.
1533   * @throws { BusinessError } 16000012 - The application is controlled.
1534   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1535   * @throws { BusinessError } 16000050 - Internal error.
1536   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1537   * @throws { BusinessError } 16000055 - Installation-free timed out.
1538   * @throws { BusinessError } 16200001 - The caller has been released.
1539   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1540   * @stagemodelonly
1541   * @atomicservice
1542   * @since 11
1543   */
1544  /**
1545   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1546   * you can use this method to start ability; If the caller application is in the background,
1547   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1548   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1549   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1550   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1551   *
1552   * @param { Want } want - Indicates the ability to start.
1553   * @param { StartOptions } [options] - Indicates the start options.
1554   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
1555   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1556   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1557   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1558   * @throws { BusinessError } 16000002 - Incorrect ability type.
1559   * @throws { BusinessError } 16000004 - Can not start invisible component.
1560   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1561   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1562   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1563   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1564   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1565   * @throws { BusinessError } 16000011 - The context does not exist.
1566   * @throws { BusinessError } 16000012 - The application is controlled.
1567   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1568   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
1569   * @throws { BusinessError } 16000019 - Can not match any component.
1570   * @throws { BusinessError } 16000050 - Internal error.
1571   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1572   * @throws { BusinessError } 16000055 - Installation-free timed out.
1573   * @throws { BusinessError } 16200001 - The caller has been released.
1574   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1575   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1576   * @stagemodelonly
1577   * @atomicservice
1578   * @since 12
1579   */
1580  startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityResult>;
1581
1582  /**
1583   * Starts an ability and returns the execution result when the ability is destroyed with account.
1584   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
1585   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1586   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1587   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1588   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1589   *
1590   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1591   * @param { Want } want - Indicates the want info to start.
1592   * @param { number } accountId - Indicates the account to start.
1593   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1594   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1595   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1596   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1597   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1598   * @throws { BusinessError } 16000002 - Incorrect ability type.
1599   * @throws { BusinessError } 16000004 - Can not start invisible component.
1600   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1601   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1602   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1603   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1604   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1605   * @throws { BusinessError } 16000011 - The context does not exist.
1606   * @throws { BusinessError } 16000050 - Internal error.
1607   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1608   * @throws { BusinessError } 16000055 - Installation-free timed out.
1609   * @throws { BusinessError } 16200001 - The caller has been released.
1610   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1611   * @systemapi
1612   * @stagemodelonly
1613   * @since 9
1614   */
1615  /**
1616   * Starts an ability and returns the execution result when the ability is destroyed with account.
1617   *
1618   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1619   * @param { Want } want - Indicates the want info to start.
1620   * @param { number } accountId - Indicates the account to start.
1621   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1622   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1623   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1624   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1625   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1626   * @throws { BusinessError } 16000002 - Incorrect ability type.
1627   * @throws { BusinessError } 16000004 - Can not start invisible component.
1628   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1629   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1630   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1631   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1632   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1633   * @throws { BusinessError } 16000011 - The context does not exist.
1634   * @throws { BusinessError } 16000012 - The application is controlled.
1635   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1636   * @throws { BusinessError } 16000050 - Internal error.
1637   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1638   * @throws { BusinessError } 16000055 - Installation-free timed out.
1639   * @throws { BusinessError } 16200001 - The caller has been released.
1640   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1641   * @systemapi
1642   * @stagemodelonly
1643   * @since 10
1644   */
1645  /**
1646   * Starts an ability and returns the execution result when the ability is destroyed with account.
1647   *
1648   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1649   * @param { Want } want - Indicates the want info to start.
1650   * @param { number } accountId - Indicates the account to start.
1651   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1652   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1653   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1654   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1655   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1656   * @throws { BusinessError } 16000002 - Incorrect ability type.
1657   * @throws { BusinessError } 16000004 - Can not start invisible component.
1658   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1659   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1660   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1661   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1662   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1663   * @throws { BusinessError } 16000011 - The context does not exist.
1664   * @throws { BusinessError } 16000012 - The application is controlled.
1665   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1666   * @throws { BusinessError } 16000019 - Can not match any component.
1667   * @throws { BusinessError } 16000050 - Internal error.
1668   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1669   * @throws { BusinessError } 16000055 - Installation-free timed out.
1670   * @throws { BusinessError } 16200001 - The caller has been released.
1671   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1672   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1673   * @systemapi
1674   * @stagemodelonly
1675   * @since 12
1676   */
1677  startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback<AbilityResult>): void;
1678
1679  /**
1680   * Starts an ability and returns the execution result when the ability is destroyed with account.
1681   *
1682   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1683   * @param { Want } want - Indicates the want info to start.
1684   * @param { number } accountId - Indicates the account to start.
1685   * @param { StartOptions } options - Indicates the start options.
1686   * @param { AsyncCallback<void> } callback - The callback is used to return the result of startAbility.
1687   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1688   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1689   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1690   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1691   * @throws { BusinessError } 16000002 - Incorrect ability type.
1692   * @throws { BusinessError } 16000004 - Can not start invisible component.
1693   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1694   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1695   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1696   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1697   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1698   * @throws { BusinessError } 16000011 - The context does not exist.
1699   * @throws { BusinessError } 16000050 - Internal error.
1700   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1701   * @throws { BusinessError } 16000055 - Installation-free timed out.
1702   * @throws { BusinessError } 16200001 - The caller has been released.
1703   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1704   * @systemapi
1705   * @stagemodelonly
1706   * @since 9
1707   */
1708  /**
1709   * Starts an ability and returns the execution result when the ability is destroyed with account.
1710   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
1711   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1712   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1713   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1714   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1715   *
1716   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1717   * @param { Want } want - Indicates the want info to start.
1718   * @param { number } accountId - Indicates the account to start.
1719   * @param { StartOptions } options - Indicates the start options.
1720   * @param { AsyncCallback<void> } callback - The callback is used to return the result of startAbility.
1721   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1722   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1723   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1724   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1725   * @throws { BusinessError } 16000004 - Can not start invisible component.
1726   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1727   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1728   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1729   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1730   * @throws { BusinessError } 16000011 - The context does not exist.
1731   * @throws { BusinessError } 16000012 - The application is controlled.
1732   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1733   * @throws { BusinessError } 16000050 - Internal error.
1734   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1735   * @throws { BusinessError } 16000055 - Installation-free timed out.
1736   * @throws { BusinessError } 16200001 - The caller has been released.
1737   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1738   * @systemapi
1739   * @stagemodelonly
1740   * @since 10
1741   */
1742  /**
1743   * Starts an ability and returns the execution result when the ability is destroyed with account.
1744   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
1745   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1746   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1747   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1748   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1749   *
1750   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1751   * @param { Want } want - Indicates the want info to start.
1752   * @param { number } accountId - Indicates the account to start.
1753   * @param { StartOptions } options - Indicates the start options.
1754   * @param { AsyncCallback<void> } callback - The callback is used to return the result of startAbility.
1755   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1756   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1757   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1758   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1759   * @throws { BusinessError } 16000004 - Can not start invisible component.
1760   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1761   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1762   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1763   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1764   * @throws { BusinessError } 16000011 - The context does not exist.
1765   * @throws { BusinessError } 16000012 - The application is controlled.
1766   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1767   * @throws { BusinessError } 16000019 - Can not match any component.
1768   * @throws { BusinessError } 16000050 - Internal error.
1769   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1770   * @throws { BusinessError } 16000055 - Installation-free timed out.
1771   * @throws { BusinessError } 16200001 - The caller has been released.
1772   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1773   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1774   * @systemapi
1775   * @stagemodelonly
1776   * @since 12
1777   */
1778  startAbilityForResultWithAccount(
1779    want: Want,
1780    accountId: number,
1781    options: StartOptions,
1782    callback: AsyncCallback<void>
1783  ): void;
1784
1785  /**
1786   * Starts an ability and returns the execution result when the ability is destroyed with account.
1787   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
1788   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1789   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1790   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1791   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1792   *
1793   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1794   * @param { Want } want - Indicates the want info to start.
1795   * @param { number } accountId - Indicates the account to start.
1796   * @param { StartOptions } [options] - Indicates the start options.
1797   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
1798   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1799   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1800   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1801   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1802   * @throws { BusinessError } 16000002 - Incorrect ability type.
1803   * @throws { BusinessError } 16000004 - Can not start invisible component.
1804   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1805   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1806   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1807   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1808   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1809   * @throws { BusinessError } 16000011 - The context does not exist.
1810   * @throws { BusinessError } 16000050 - Internal error.
1811   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1812   * @throws { BusinessError } 16000055 - Installation-free timed out.
1813   * @throws { BusinessError } 16200001 - The caller has been released.
1814   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1815   * @systemapi
1816   * @stagemodelonly
1817   * @since 9
1818   */
1819  /**
1820   * Starts an ability and returns the execution result when the ability is destroyed with account.
1821   *
1822   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1823   * @param { Want } want - Indicates the want info to start.
1824   * @param { number } accountId - Indicates the account to start.
1825   * @param { StartOptions } [options] - Indicates the start options.
1826   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
1827   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1828   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1829   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1830   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1831   * @throws { BusinessError } 16000002 - Incorrect ability type.
1832   * @throws { BusinessError } 16000004 - Can not start invisible component.
1833   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1834   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1835   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1836   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1837   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1838   * @throws { BusinessError } 16000011 - The context does not exist.
1839   * @throws { BusinessError } 16000012 - The application is controlled.
1840   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1841   * @throws { BusinessError } 16000050 - Internal error.
1842   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1843   * @throws { BusinessError } 16000055 - Installation-free timed out.
1844   * @throws { BusinessError } 16200001 - The caller has been released.
1845   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1846   * @systemapi
1847   * @stagemodelonly
1848   * @since 10
1849   */
1850  /**
1851   * Starts an ability and returns the execution result when the ability is destroyed with account.
1852   *
1853   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1854   * @param { Want } want - Indicates the want info to start.
1855   * @param { number } accountId - Indicates the account to start.
1856   * @param { StartOptions } [options] - Indicates the start options.
1857   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
1858   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1859   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1860   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1861   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1862   * @throws { BusinessError } 16000002 - Incorrect ability type.
1863   * @throws { BusinessError } 16000004 - Can not start invisible component.
1864   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1865   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1866   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1867   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1868   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1869   * @throws { BusinessError } 16000011 - The context does not exist.
1870   * @throws { BusinessError } 16000012 - The application is controlled.
1871   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1872   * @throws { BusinessError } 16000019 - Can not match any component.
1873   * @throws { BusinessError } 16000050 - Internal error.
1874   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1875   * @throws { BusinessError } 16000055 - Installation-free timed out.
1876   * @throws { BusinessError } 16200001 - The caller has been released.
1877   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1878   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1879   * @systemapi
1880   * @stagemodelonly
1881   * @since 12
1882   */
1883  startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartOptions): Promise<AbilityResult>;
1884
1885  /**
1886   * Starts a new service extension ability.
1887   *
1888   * @param { Want } want - Indicates the want info to start.
1889   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
1890   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1891   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1892   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1893   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1894   * @throws { BusinessError } 16000002 - Incorrect ability type.
1895   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1896   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1897   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1898   * @throws { BusinessError } 16000011 - The context does not exist.
1899   * @throws { BusinessError } 16000050 - Internal error.
1900   * @throws { BusinessError } 16200001 - The caller has been released.
1901   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1902   * @systemapi
1903   * @stagemodelonly
1904   * @since 9
1905   */
1906  /**
1907   * Starts a new service extension ability.
1908   * If the target service extension ability is visible, you can start the target service extension ability;
1909   * If the target service extension ability is invisible,
1910   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
1911   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1912   *
1913   * @param { Want } want - Indicates the want info to start.
1914   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
1915   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1916   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1917   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1918   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1919   * @throws { BusinessError } 16000002 - Incorrect ability type.
1920   * @throws { BusinessError } 16000004 - Can not start invisible component.
1921   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1922   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1923   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1924   * @throws { BusinessError } 16000011 - The context does not exist.
1925   * @throws { BusinessError } 16000012 - The application is controlled.
1926   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1927   * @throws { BusinessError } 16000050 - Internal error.
1928   * @throws { BusinessError } 16200001 - The caller has been released.
1929   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1930   * @systemapi
1931   * @stagemodelonly
1932   * @since 10
1933   */
1934  /**
1935   * Starts a new service extension ability.
1936   * If the target service extension ability is visible, you can start the target service extension ability;
1937   * If the target service extension ability is invisible,
1938   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
1939   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1940   *
1941   * @param { Want } want - Indicates the want info to start.
1942   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
1943   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1944   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1945   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1946   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1947   * @throws { BusinessError } 16000002 - Incorrect ability type.
1948   * @throws { BusinessError } 16000004 - Can not start invisible component.
1949   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1950   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1951   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1952   * @throws { BusinessError } 16000011 - The context does not exist.
1953   * @throws { BusinessError } 16000012 - The application is controlled.
1954   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1955   * @throws { BusinessError } 16000019 - Can not match any component.
1956   * @throws { BusinessError } 16000050 - Internal error.
1957   * @throws { BusinessError } 16200001 - The caller has been released.
1958   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1959   * @systemapi
1960   * @stagemodelonly
1961   * @since 12
1962   */
1963  startServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void;
1964
1965  /**
1966   * Starts a new service extension ability.
1967   *
1968   * @param { Want } want - Indicates the want info to start.
1969   * @returns { Promise<void> } The promise returned by the function.
1970   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1971   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1972   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1973   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1974   * @throws { BusinessError } 16000002 - Incorrect ability type.
1975   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1976   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1977   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1978   * @throws { BusinessError } 16000011 - The context does not exist.
1979   * @throws { BusinessError } 16000050 - Internal error.
1980   * @throws { BusinessError } 16200001 - The caller has been released.
1981   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1982   * @systemapi
1983   * @stagemodelonly
1984   * @since 9
1985   */
1986  /**
1987   * Starts a new service extension ability.
1988   * If the target service extension ability is visible, you can start the target service extension ability;
1989   * If the target service extension ability is invisible,
1990   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
1991   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1992   *
1993   * @param { Want } want - Indicates the want info to start.
1994   * @returns { Promise<void> } The promise returned by the function.
1995   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1996   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1997   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1998   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1999   * @throws { BusinessError } 16000002 - Incorrect ability type.
2000   * @throws { BusinessError } 16000004 - Can not start invisible component.
2001   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2002   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2003   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2004   * @throws { BusinessError } 16000011 - The context does not exist.
2005   * @throws { BusinessError } 16000012 - The application is controlled.
2006   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2007   * @throws { BusinessError } 16000050 - Internal error.
2008   * @throws { BusinessError } 16200001 - The caller has been released.
2009   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2010   * @systemapi
2011   * @stagemodelonly
2012   * @since 10
2013   */
2014  /**
2015   * Starts a new service extension ability.
2016   * If the target service extension ability is visible, you can start the target service extension ability;
2017   * If the target service extension ability is invisible,
2018   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2019   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2020   *
2021   * @param { Want } want - Indicates the want info to start.
2022   * @returns { Promise<void> } The promise returned by the function.
2023   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2024   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2025   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2026   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2027   * @throws { BusinessError } 16000002 - Incorrect ability type.
2028   * @throws { BusinessError } 16000004 - Can not start invisible component.
2029   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2030   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2031   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2032   * @throws { BusinessError } 16000011 - The context does not exist.
2033   * @throws { BusinessError } 16000012 - The application is controlled.
2034   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2035   * @throws { BusinessError } 16000019 - Can not match any component.
2036   * @throws { BusinessError } 16000050 - Internal error.
2037   * @throws { BusinessError } 16200001 - The caller has been released.
2038   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2039   * @systemapi
2040   * @stagemodelonly
2041   * @since 12
2042   */
2043  startServiceExtensionAbility(want: Want): Promise<void>;
2044
2045  /**
2046   * Starts a new service extension ability with account.
2047   *
2048   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2049   * @param { Want } want - Indicates the want info to start.
2050   * @param { number } accountId - Indicates the account to start.
2051   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
2052   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2053   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2054   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2055   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2056   * @throws { BusinessError } 16000002 - Incorrect ability type.
2057   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2058   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2059   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2060   * @throws { BusinessError } 16000011 - The context does not exist.
2061   * @throws { BusinessError } 16000050 - Internal error.
2062   * @throws { BusinessError } 16200001 - The caller has been released.
2063   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2064   * @systemapi
2065   * @stagemodelonly
2066   * @since 9
2067   */
2068  /**
2069   * Starts a new service extension ability with account.
2070   * If the target service extension ability is visible, you can start the target service extension ability;
2071   * If the target service extension ability is invisible,
2072   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2073   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2074   *
2075   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2076   * @param { Want } want - Indicates the want info to start.
2077   * @param { number } accountId - Indicates the account to start.
2078   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
2079   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2080   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2081   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2082   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2083   * @throws { BusinessError } 16000002 - Incorrect ability type.
2084   * @throws { BusinessError } 16000004 - Can not start invisible component.
2085   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2086   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2087   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2088   * @throws { BusinessError } 16000011 - The context does not exist.
2089   * @throws { BusinessError } 16000012 - The application is controlled.
2090   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2091   * @throws { BusinessError } 16000050 - Internal error.
2092   * @throws { BusinessError } 16200001 - The caller has been released.
2093   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2094   * @systemapi
2095   * @stagemodelonly
2096   * @since 10
2097   */
2098  /**
2099   * Starts a new service extension ability with account.
2100   * If the target service extension ability is visible, you can start the target service extension ability;
2101   * If the target service extension ability is invisible,
2102   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2103   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2104   *
2105   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2106   * @param { Want } want - Indicates the want info to start.
2107   * @param { number } accountId - Indicates the account to start.
2108   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
2109   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2110   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2111   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2112   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2113   * @throws { BusinessError } 16000002 - Incorrect ability type.
2114   * @throws { BusinessError } 16000004 - Can not start invisible component.
2115   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2116   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2117   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2118   * @throws { BusinessError } 16000011 - The context does not exist.
2119   * @throws { BusinessError } 16000012 - The application is controlled.
2120   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2121   * @throws { BusinessError } 16000019 - Can not match any component.
2122   * @throws { BusinessError } 16000050 - Internal error.
2123   * @throws { BusinessError } 16200001 - The caller has been released.
2124   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2125   * @systemapi
2126   * @stagemodelonly
2127   * @since 12
2128   */
2129  startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
2130
2131  /**
2132   * Starts a new service extension ability with account.
2133   *
2134   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2135   * @param { Want } want - Indicates the want info to start.
2136   * @param { number } accountId - Indicates the account to start.
2137   * @returns { Promise<void> } The promise returned by the function.
2138   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2139   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2140   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2141   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2142   * @throws { BusinessError } 16000002 - Incorrect ability type.
2143   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2144   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2145   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2146   * @throws { BusinessError } 16000011 - The context does not exist.
2147   * @throws { BusinessError } 16000050 - Internal error.
2148   * @throws { BusinessError } 16200001 - The caller has been released.
2149   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2150   * @systemapi
2151   * @stagemodelonly
2152   * @since 9
2153   */
2154  /**
2155   * Starts a new service extension ability with account.
2156   * If the target service extension ability is visible, you can start the target service extension ability;
2157   * If the target service extension ability is invisible,
2158   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2159   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2160   *
2161   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2162   * @param { Want } want - Indicates the want info to start.
2163   * @param { number } accountId - Indicates the account to start.
2164   * @returns { Promise<void> } The promise returned by the function.
2165   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2166   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2167   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2168   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2169   * @throws { BusinessError } 16000002 - Incorrect ability type.
2170   * @throws { BusinessError } 16000004 - Can not start invisible component.
2171   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2172   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2173   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2174   * @throws { BusinessError } 16000011 - The context does not exist.
2175   * @throws { BusinessError } 16000012 - The application is controlled.
2176   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2177   * @throws { BusinessError } 16000050 - Internal error.
2178   * @throws { BusinessError } 16200001 - The caller has been released.
2179   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2180   * @systemapi
2181   * @stagemodelonly
2182   * @since 10
2183   */
2184  /**
2185   * Starts a new service extension ability with account.
2186   * If the target service extension ability is visible, you can start the target service extension ability;
2187   * If the target service extension ability is invisible,
2188   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2189   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2190   *
2191   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2192   * @param { Want } want - Indicates the want info to start.
2193   * @param { number } accountId - Indicates the account to start.
2194   * @returns { Promise<void> } The promise returned by the function.
2195   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2196   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2197   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2198   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2199   * @throws { BusinessError } 16000002 - Incorrect ability type.
2200   * @throws { BusinessError } 16000004 - Can not start invisible component.
2201   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2202   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2203   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2204   * @throws { BusinessError } 16000011 - The context does not exist.
2205   * @throws { BusinessError } 16000012 - The application is controlled.
2206   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2207   * @throws { BusinessError } 16000019 - Can not match any component.
2208   * @throws { BusinessError } 16000050 - Internal error.
2209   * @throws { BusinessError } 16200001 - The caller has been released.
2210   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2211   * @systemapi
2212   * @stagemodelonly
2213   * @since 12
2214   */
2215  startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>;
2216
2217  /**
2218   * Stops other service extension ability.
2219   *
2220   * @param { Want } want - Indicates the want info to start.
2221   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbility.
2222   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2223   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2224   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2225   * @throws { BusinessError } 16000002 - Incorrect ability type.
2226   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2227   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2228   * @throws { BusinessError } 16000011 - The context does not exist.
2229   * @throws { BusinessError } 16000050 - Internal error.
2230   * @throws { BusinessError } 16200001 - The caller has been released.
2231   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2232   * @systemapi
2233   * @stagemodelonly
2234   * @since 9
2235   */
2236  /**
2237   * Stops other service extension ability.
2238   * If the target service extension ability is visible, you can stop the target service extension ability;
2239   * If the target service extension ability is invisible,
2240   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
2241   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2242   *
2243   * @param { Want } want - Indicates the want info to start.
2244   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbility.
2245   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2246   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2247   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2248   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2249   * @throws { BusinessError } 16000002 - Incorrect ability type.
2250   * @throws { BusinessError } 16000004 - Can not start invisible component.
2251   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2252   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2253   * @throws { BusinessError } 16000011 - The context does not exist.
2254   * @throws { BusinessError } 16000012 - The application is controlled.
2255   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2256   * @throws { BusinessError } 16000050 - Internal error.
2257   * @throws { BusinessError } 16200001 - The caller has been released.
2258   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2259   * @systemapi
2260   * @stagemodelonly
2261   * @since 10
2262   */
2263  stopServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void;
2264
2265  /**
2266   * Stops other service extension ability.
2267   *
2268   * @param { Want } want - Indicates the want info to start.
2269   * @returns { Promise<void> } The promise returned by the function.
2270   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2271   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2272   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2273   * @throws { BusinessError } 16000002 - Incorrect ability type.
2274   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2275   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2276   * @throws { BusinessError } 16000011 - The context does not exist.
2277   * @throws { BusinessError } 16000050 - Internal error.
2278   * @throws { BusinessError } 16200001 - The caller has been released.
2279   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2280   * @systemapi
2281   * @stagemodelonly
2282   * @since 9
2283   */
2284  /**
2285   * Stops other service extension ability.
2286   * If the target service extension ability is visible, you can stop the target service extension ability;
2287   * If the target service extension ability is invisible,
2288   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
2289   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2290   *
2291   * @param { Want } want - Indicates the want info to start.
2292   * @returns { Promise<void> } The promise returned by the function.
2293   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2294   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2295   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2296   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2297   * @throws { BusinessError } 16000002 - Incorrect ability type.
2298   * @throws { BusinessError } 16000004 - Can not start invisible component.
2299   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2300   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2301   * @throws { BusinessError } 16000011 - The context does not exist.
2302   * @throws { BusinessError } 16000050 - Internal error.
2303   * @throws { BusinessError } 16200001 - The caller has been released.
2304   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2305   * @systemapi
2306   * @stagemodelonly
2307   * @since 10
2308   */
2309  stopServiceExtensionAbility(want: Want): Promise<void>;
2310
2311  /**
2312   * Stops other service extension ability with account.
2313   *
2314   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2315   * @param { Want } want - Indicates the want info to start.
2316   * @param { number } accountId - Indicates the accountId to start.
2317   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbilityWithAccount.
2318   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2319   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2320   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2321   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2322   * @throws { BusinessError } 16000002 - Incorrect ability type.
2323   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2324   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2325   * @throws { BusinessError } 16000011 - The context does not exist.
2326   * @throws { BusinessError } 16000050 - Internal error.
2327   * @throws { BusinessError } 16200001 - The caller has been released.
2328   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2329   * @systemapi
2330   * @stagemodelonly
2331   * @since 9
2332   */
2333  /**
2334   * Stops other service extension ability with account.
2335   * If the target service extension ability is visible, you can stop the target service extension ability;
2336   * If the target service extension ability is invisible,
2337   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
2338   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2339   *
2340   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2341   * @param { Want } want - Indicates the want info to start.
2342   * @param { number } accountId - Indicates the accountId to start.
2343   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbilityWithAccount.
2344   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2345   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2346   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2347   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2348   * @throws { BusinessError } 16000002 - Incorrect ability type.
2349   * @throws { BusinessError } 16000004 - Can not start invisible component.
2350   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2351   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2352   * @throws { BusinessError } 16000011 - The context does not exist.
2353   * @throws { BusinessError } 16000050 - Internal error.
2354   * @throws { BusinessError } 16200001 - The caller has been released.
2355   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2356   * @systemapi
2357   * @stagemodelonly
2358   * @since 10
2359   */
2360  stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
2361
2362  /**
2363   * Stops other service extension ability with account.
2364   *
2365   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2366   * @param { Want } want - Indicates the want info to start.
2367   * @param { number } accountId - Indicates the accountId to start.
2368   * @returns { Promise<void> } The promise returned by the function.
2369   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2370   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2371   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2372   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2373   * @throws { BusinessError } 16000002 - Incorrect ability type.
2374   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2375   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2376   * @throws { BusinessError } 16000011 - The context does not exist.
2377   * @throws { BusinessError } 16000050 - Internal error.
2378   * @throws { BusinessError } 16200001 - The caller has been released.
2379   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2380   * @systemapi
2381   * @stagemodelonly
2382   * @since 9
2383   */
2384  /**
2385   * Stops other service extension ability with account.
2386   * If the target service extension ability is visible, you can stop the target service extension ability;
2387   * If the target service extension ability is invisible,
2388   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
2389   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2390   *
2391   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2392   * @param { Want } want - Indicates the want info to start.
2393   * @param { number } accountId - Indicates the accountId to start.
2394   * @returns { Promise<void> } The promise returned by the function.
2395   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2396   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2397   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2398   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2399   * @throws { BusinessError } 16000002 - Incorrect ability type.
2400   * @throws { BusinessError } 16000004 - Can not start invisible component.
2401   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2402   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2403   * @throws { BusinessError } 16000011 - The context does not exist.
2404   * @throws { BusinessError } 16000050 - Internal error.
2405   * @throws { BusinessError } 16200001 - The caller has been released.
2406   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2407   * @systemapi
2408   * @stagemodelonly
2409   * @since 10
2410   */
2411  stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>;
2412
2413  /**
2414   * Destroys this Page ability.
2415   *
2416   * @param { AsyncCallback<void> } callback - The callback of terminateSelf.
2417   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2418   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2419   * @throws { BusinessError } 16000004 - Can not start invisible component.
2420   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2421   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2422   * @throws { BusinessError } 16000011 - The context does not exist.
2423   * @throws { BusinessError } 16000050 - Internal error.
2424   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2425   * @stagemodelonly
2426   * @since 9
2427   */
2428  /**
2429   * Destroys this Page ability.
2430   *
2431   * @param { AsyncCallback<void> } callback - The callback of terminateSelf.
2432   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2433   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2434   * @throws { BusinessError } 16000011 - The context does not exist.
2435   * @throws { BusinessError } 16000050 - Internal error.
2436   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2437   * @stagemodelonly
2438   * @crossplatform
2439   * @since 10
2440   */
2441  /**
2442   * Destroys this Page ability.
2443   *
2444   * @param { AsyncCallback<void> } callback - The callback of terminateSelf.
2445   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2446   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2447   * @throws { BusinessError } 16000011 - The context does not exist.
2448   * @throws { BusinessError } 16000050 - Internal error.
2449   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2450   * @stagemodelonly
2451   * @crossplatform
2452   * @atomicservice
2453   * @since 11
2454   */
2455  terminateSelf(callback: AsyncCallback<void>): void;
2456
2457  /**
2458   * Destroys this Page ability.
2459   *
2460   * @returns { Promise<void> } The promise returned by the function.
2461   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2462   * @throws { BusinessError } 16000004 - Can not start invisible component.
2463   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2464   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2465   * @throws { BusinessError } 16000011 - The context does not exist.
2466   * @throws { BusinessError } 16000050 - Internal error.
2467   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2468   * @stagemodelonly
2469   * @since 9
2470   */
2471  /**
2472   * Destroys this Page ability.
2473   *
2474   * @returns { Promise<void> } The promise returned by the function.
2475   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2476   * @throws { BusinessError } 16000011 - The context does not exist.
2477   * @throws { BusinessError } 16000050 - Internal error.
2478   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2479   * @stagemodelonly
2480   * @crossplatform
2481   * @since 10
2482   */
2483  /**
2484   * Destroys this Page ability.
2485   *
2486   * @returns { Promise<void> } The promise returned by the function.
2487   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2488   * @throws { BusinessError } 16000011 - The context does not exist.
2489   * @throws { BusinessError } 16000050 - Internal error.
2490   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2491   * @stagemodelonly
2492   * @crossplatform
2493   * @atomicservice
2494   * @since 11
2495   */
2496  terminateSelf(): Promise<void>;
2497
2498  /**
2499   * Destroys the Page ability while returning the specified result code and data to the caller.
2500   *
2501   * @param { AbilityResult } parameter - Indicates the result to return.
2502   * @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
2503   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2504   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2505   * @throws { BusinessError } 16000004 - Can not start invisible component.
2506   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2507   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2508   * @throws { BusinessError } 16000011 - The context does not exist.
2509   * @throws { BusinessError } 16000050 - Internal error.
2510   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2511   * @stagemodelonly
2512   * @since 9
2513   */
2514  /**
2515   * Destroys the Page ability while returning the specified result code and data to the caller.
2516   *
2517   * @param { AbilityResult } parameter - Indicates the result to return.
2518   * @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
2519   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2520   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2521   * @throws { BusinessError } 16000011 - The context does not exist.
2522   * @throws { BusinessError } 16000050 - Internal error.
2523   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2524   * @stagemodelonly
2525   * @since 10
2526   */
2527  /**
2528   * Destroys the Page ability while returning the specified result code and data to the caller.
2529   *
2530   * @param { AbilityResult } parameter - Indicates the result to return.
2531   * @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
2532   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2533   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2534   * @throws { BusinessError } 16000011 - The context does not exist.
2535   * @throws { BusinessError } 16000050 - Internal error.
2536   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2537   * @stagemodelonly
2538   * @atomicservice
2539   * @since 11
2540   */
2541  terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void;
2542
2543  /**
2544   * Destroys the Page ability while returning the specified result code and data to the caller.
2545   *
2546   * @param { AbilityResult } parameter - Indicates the result to return.
2547   * @returns { Promise<void> } The promise returned by the function.
2548   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2549   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2550   * @throws { BusinessError } 16000004 - Can not start invisible component.
2551   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2552   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2553   * @throws { BusinessError } 16000011 - The context does not exist.
2554   * @throws { BusinessError } 16000050 - Internal error.
2555   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2556   * @stagemodelonly
2557   * @since 9
2558   */
2559  /**
2560   * Destroys the Page ability while returning the specified result code and data to the caller.
2561   *
2562   * @param { AbilityResult } parameter - Indicates the result to return.
2563   * @returns { Promise<void> } The promise returned by the function.
2564   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2565   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2566   * @throws { BusinessError } 16000011 - The context does not exist.
2567   * @throws { BusinessError } 16000050 - Internal error.
2568   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2569   * @stagemodelonly
2570   * @since 10
2571   */
2572  /**
2573   * Destroys the Page ability while returning the specified result code and data to the caller.
2574   *
2575   * @param { AbilityResult } parameter - Indicates the result to return.
2576   * @returns { Promise<void> } The promise returned by the function.
2577   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2578   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2579   * @throws { BusinessError } 16000011 - The context does not exist.
2580   * @throws { BusinessError } 16000050 - Internal error.
2581   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2582   * @stagemodelonly
2583   * @atomicservice
2584   * @since 11
2585   */
2586  terminateSelfWithResult(parameter: AbilityResult): Promise<void>;
2587
2588  /**
2589   * Return to caller application with specified result code and data while not destroying current ability.
2590   * If the current application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
2591   *
2592   * @param { AbilityResult } abilityResult - Indicates the result to return.
2593   * @param { string } requestCode - Indicates the request code of caller ability.
2594   * @returns { Promise<void> } The promise returned by the function.
2595   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2596   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2597   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2598   * @throws { BusinessError } 16000011 - The context does not exist.
2599   * @throws { BusinessError } 16000050 - Internal error.
2600   * @throws { BusinessError } 16000074 - The caller does not exist.
2601   * @throws { BusinessError } 16000075 - Not support back to caller.
2602   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2603   * @stagemodelonly
2604   * @atomicservice
2605   * @since 12
2606   */
2607  backToCallerAbilityWithResult(abilityResult: AbilityResult, requestCode: string): Promise<void>;
2608
2609  /**
2610   * Connects the current ability to an service extension ability.
2611   *
2612   * @param { Want } want - The element name of the service ability
2613   * @param { ConnectOptions } options - The remote object instance
2614   * @returns { number } Returns the number code of the ability connected
2615   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2616   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2617   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2618   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2619   * @throws { BusinessError } 16000011 - The context does not exist.
2620   * @throws { BusinessError } 16000050 - Internal error.
2621   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2622   * @stagemodelonly
2623   * @since 9
2624   */
2625  /**
2626   * Connects the current ability to an service extension ability.
2627   * If the target service extension ability is visible, you can connect the target service extension ability;
2628   * If the target service extension ability is invisible,
2629   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible service extension ability.
2630   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2631   *
2632   * @param { Want } want - The element name of the service ability
2633   * @param { ConnectOptions } options - The remote object instance
2634   * @returns { number } Returns the number code of the ability connected
2635   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2636   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2637   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2638   * @throws { BusinessError } 16000002 - Incorrect ability type.
2639   * @throws { BusinessError } 16000004 - Can not start invisible component.
2640   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2641   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2642   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2643   * @throws { BusinessError } 16000011 - The context does not exist.
2644   * @throws { BusinessError } 16000050 - Internal error.
2645   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2646   * @throws { BusinessError } 16000055 - Installation-free timed out.
2647   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2648   * @stagemodelonly
2649   * @since 10
2650   */
2651  connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
2652
2653  /**
2654   * Connects the current ability to an service extension ability with account.
2655   *
2656   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2657   * @param { Want } want - The element name of the service ability
2658   * @param { number } accountId - The account to connect
2659   * @param { ConnectOptions } options - The remote object instance
2660   * @returns { number } Returns the number code of the ability connected
2661   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2662   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2663   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2664   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2665   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2666   * @throws { BusinessError } 16000011 - The context does not exist.
2667   * @throws { BusinessError } 16000050 - Internal error.
2668   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2669   * @systemapi
2670   * @stagemodelonly
2671   * @since 9
2672   */
2673  /**
2674   * Connects the current ability to an service extension ability with account.
2675   * If the target service extension ability is visible, you can connect the target service extension ability;
2676   * If the target service extension ability is invisible,
2677   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible service extension ability.
2678   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2679   *
2680   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2681   * @param { Want } want - The element name of the service ability
2682   * @param { number } accountId - The account to connect
2683   * @param { ConnectOptions } options - The remote object instance
2684   * @returns { number } Returns the number code of the ability connected
2685   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2686   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2687   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2688   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2689   * @throws { BusinessError } 16000002 - Incorrect ability type.
2690   * @throws { BusinessError } 16000004 - Can not start invisible component.
2691   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2692   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2693   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2694   * @throws { BusinessError } 16000011 - The context does not exist.
2695   * @throws { BusinessError } 16000050 - Internal error.
2696   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2697   * @throws { BusinessError } 16000055 - Installation-free timed out.
2698   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2699   * @systemapi
2700   * @stagemodelonly
2701   * @since 10
2702   */
2703  connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number;
2704
2705  /**
2706   * Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
2707   *
2708   * @param { number } connection - The number code of the ability connected
2709   * @param { AsyncCallback<void> } callback - The callback of disconnectAbility.
2710   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2711   * @throws { BusinessError } 16000011 - The context does not exist.
2712   * @throws { BusinessError } 16000050 - Internal error.
2713   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2714   * @stagemodelonly
2715   * @since 9
2716   */
2717  disconnectServiceExtensionAbility(connection: number, callback: AsyncCallback<void>): void;
2718
2719  /**
2720   * Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
2721   *
2722   * @param { number } connection - The number code of the ability connected
2723   * @returns { Promise<void> } The promise returned by the function.
2724   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2725   * @throws { BusinessError } 16000011 - The context does not exist.
2726   * @throws { BusinessError } 16000050 - Internal error.
2727   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2728   * @stagemodelonly
2729   * @since 9
2730   */
2731  disconnectServiceExtensionAbility(connection: number): Promise<void>;
2732
2733  /**
2734   * Set mission label of current ability.
2735   *
2736   * @param { string } label - The label of ability that showed in recent missions.
2737   * @param { AsyncCallback<void> } callback - The callback of setMissionLabel.
2738   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2739   * @throws { BusinessError } 16000011 - The context does not exist.
2740   * @throws { BusinessError } 16000050 - Internal error.
2741   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2742   * @stagemodelonly
2743   * @since 9
2744   */
2745  /**
2746   * Set mission label of current ability.
2747   *
2748   * @param { string } label - The label of ability that showed in recent missions.
2749   * @param { AsyncCallback<void> } callback - The callback of setMissionLabel.
2750   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2751   * @throws { BusinessError } 16000011 - The context does not exist.
2752   * @throws { BusinessError } 16000050 - Internal error.
2753   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2754   * @stagemodelonly
2755   * @atomicservice
2756   * @since 11
2757   */
2758  setMissionLabel(label: string, callback: AsyncCallback<void>): void;
2759
2760  /**
2761   * Set mission label of current ability.
2762   *
2763   * @param { string } label - The label of ability that showed in recent missions.
2764   * @returns { Promise<void> } The promise returned by the function.
2765   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2766   * @throws { BusinessError } 16000011 - The context does not exist.
2767   * @throws { BusinessError } 16000050 - Internal error.
2768   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2769   * @stagemodelonly
2770   * @since 9
2771   */
2772  /**
2773   * Set mission label of current ability.
2774   *
2775   * @param { string } label - The label of ability that showed in recent missions.
2776   * @returns { Promise<void> } The promise returned by the function.
2777   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2778   * @throws { BusinessError } 16000011 - The context does not exist.
2779   * @throws { BusinessError } 16000050 - Internal error.
2780   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2781   * @stagemodelonly
2782   * @atomicservice
2783   * @since 11
2784   */
2785  setMissionLabel(label: string): Promise<void>;
2786
2787  /**
2788   * Set mission icon of current ability.
2789   *
2790   * @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
2791   * @param { AsyncCallback<void> } callback - The callback of setMissionIcon.
2792   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2793   * @throws { BusinessError } 16000011 - The context does not exist.
2794   * @throws { BusinessError } 16000050 - Internal error.
2795   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2796   * @systemapi
2797   * @stagemodelonly
2798   * @since 9
2799   */
2800  /**
2801   * Set mission icon of current ability.
2802   *
2803   * @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
2804   * @param { AsyncCallback<void> } callback - The callback of setMissionIcon.
2805   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2806   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2807   * @throws { BusinessError } 16000011 - The context does not exist.
2808   * @throws { BusinessError } 16000050 - Internal error.
2809   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2810   * @systemapi
2811   * @stagemodelonly
2812   * @since 10
2813   */
2814  setMissionIcon(icon: image.PixelMap, callback: AsyncCallback<void>): void;
2815
2816  /**
2817   * Set mission icon of current ability.
2818   *
2819   * @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
2820   * @returns { Promise<void> } The promise returned by the function.
2821   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2822   * @throws { BusinessError } 16000011 - The context does not exist.
2823   * @throws { BusinessError } 16000050 - Internal error.
2824   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2825   * @systemapi
2826   * @stagemodelonly
2827   * @since 9
2828   */
2829  /**
2830   * Set mission icon of current ability.
2831   *
2832   * @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
2833   * @returns { Promise<void> } The promise returned by the function.
2834   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2835   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2836   * @throws { BusinessError } 16000011 - The context does not exist.
2837   * @throws { BusinessError } 16000050 - Internal error.
2838   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2839   * @systemapi
2840   * @stagemodelonly
2841   * @since 10
2842   */
2843  setMissionIcon(icon: image.PixelMap): Promise<void>;
2844
2845  /**
2846   * Set mission continue state of current ability.
2847   *
2848   * @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
2849   * @param { AsyncCallback<void> } callback - The callback of setMissionContinueState.
2850   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2851   * @throws { BusinessError } 16000011 - The context does not exist.
2852   * @throws { BusinessError } 16000050 - Internal error.
2853   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2854   * @stagemodelonly
2855   * @since 10
2856   */
2857  /**
2858   * Set mission continue state of current ability.
2859   *
2860   * @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
2861   * @param { AsyncCallback<void> } callback - The callback of setMissionContinueState.
2862   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2863   * @throws { BusinessError } 16000011 - The context does not exist.
2864   * @throws { BusinessError } 16000050 - Internal error.
2865   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2866   * @stagemodelonly
2867   * @atomicservice
2868   * @since 11
2869   */
2870  setMissionContinueState(state: AbilityConstant.ContinueState, callback: AsyncCallback<void>): void;
2871
2872  /**
2873   * Set mission continue state of current ability.
2874   *
2875   * @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
2876   * @returns { Promise<void> } The promise returned by the function.
2877   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2878   * @throws { BusinessError } 16000011 - The context does not exist.
2879   * @throws { BusinessError } 16000050 - Internal error.
2880   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2881   * @stagemodelonly
2882   * @since 10
2883   */
2884  /**
2885   * Set mission continue state of current ability.
2886   *
2887   * @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
2888   * @returns { Promise<void> } The promise returned by the function.
2889   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2890   * @throws { BusinessError } 16000011 - The context does not exist.
2891   * @throws { BusinessError } 16000050 - Internal error.
2892   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2893   * @stagemodelonly
2894   * @atomicservice
2895   * @since 11
2896   */
2897  setMissionContinueState(state: AbilityConstant.ContinueState): Promise<void>;
2898
2899  /**
2900   * Restore window stage data in ability continuation
2901   *
2902   * @param { LocalStorage } localStorage - the storage data used to restore window stage
2903   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2904   * @throws { BusinessError } 16000011 - The context does not exist.
2905   * @throws { BusinessError } 16000050 - Internal error.
2906   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2907   * @stagemodelonly
2908   * @since 9
2909   */
2910  /**
2911   * Restore window stage data in ability continuation
2912   *
2913   * @param { LocalStorage } localStorage - the storage data used to restore window stage
2914   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2915   * @throws { BusinessError } 16000011 - The context does not exist.
2916   * @throws { BusinessError } 16000050 - Internal error.
2917   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2918   * @stagemodelonly
2919   * @atomicservice
2920   * @since 11
2921   */
2922  restoreWindowStage(localStorage: LocalStorage): void;
2923
2924  /**
2925   * Check to see ability is in terminating state.
2926   *
2927   * @returns { boolean } Returns true when ability is in terminating state, else returns false.
2928   * @throws { BusinessError } 16000011 - The context does not exist.
2929   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2930   * @stagemodelonly
2931   * @since 9
2932   */
2933  /**
2934   * Check to see ability is in terminating state.
2935   *
2936   * @returns { boolean } Returns true when ability is in terminating state, else returns false.
2937   * @throws { BusinessError } 16000011 - The context does not exist.
2938   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2939   * @stagemodelonly
2940   * @atomicservice
2941   * @since 11
2942   */
2943  isTerminating(): boolean;
2944
2945  /**
2946   * Service extension uses this method to start a specific ability,
2947   * if ability is multi instance, will start a recent instance.
2948   *
2949   * @param { Want } want - Indicates the ability to start.
2950   * @param { AsyncCallback<void> } callback - The callback of startAbility.
2951   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2952   * 2. Incorrect parameter types; 3. Parameter verification failed.
2953   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2954   * @throws { BusinessError } 16000002 - Incorrect ability type.
2955   * @throws { BusinessError } 16000004 - Can not start invisible component.
2956   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2957   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2958   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2959   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2960   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
2961   * @throws { BusinessError } 16000011 - The context does not exist.
2962   * @throws { BusinessError } 16000050 - Internal error.
2963   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2964   * @throws { BusinessError } 16000055 - Installation-free timed out.
2965   * @throws { BusinessError } 16200001 - The caller has been released.
2966   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2967   * @systemapi
2968   * @stagemodelonly
2969   * @since 9
2970   */
2971  /**
2972   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
2973   * you can use this method to start ability; If the caller application is in the background,
2974   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
2975   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
2976   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
2977   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2978   *
2979   * @param { Want } want - Indicates the ability to start.
2980   * @param { AsyncCallback<void> } callback - The callback of startAbility.
2981   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2982   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
2983   * 2. Incorrect parameter types; 3. Parameter verification failed.
2984   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2985   * @throws { BusinessError } 16000002 - Incorrect ability type.
2986   * @throws { BusinessError } 16000004 - Can not start invisible component.
2987   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2988   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2989   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2990   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2991   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
2992   * @throws { BusinessError } 16000011 - The context does not exist.
2993   * @throws { BusinessError } 16000012 - The application is controlled.
2994   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2995   * @throws { BusinessError } 16000050 - Internal error.
2996   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2997   * @throws { BusinessError } 16000055 - Installation-free timed out.
2998   * @throws { BusinessError } 16200001 - The caller has been released.
2999   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3000   * @systemapi
3001   * @stagemodelonly
3002   * @since 10
3003   */
3004  /**
3005   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3006   * you can use this method to start ability; If the caller application is in the background,
3007   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3008   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3009   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3010   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3011   *
3012   * @param { Want } want - Indicates the ability to start.
3013   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3014   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3015   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3016   * 2. Incorrect parameter types; 3. Parameter verification failed.
3017   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3018   * @throws { BusinessError } 16000002 - Incorrect ability type.
3019   * @throws { BusinessError } 16000004 - Can not start invisible component.
3020   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3021   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3022   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3023   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3024   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3025   * @throws { BusinessError } 16000011 - The context does not exist.
3026   * @throws { BusinessError } 16000012 - The application is controlled.
3027   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3028   * @throws { BusinessError } 16000050 - Internal error.
3029   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3030   * @throws { BusinessError } 16000055 - Installation-free timed out.
3031   * @throws { BusinessError } 16200001 - The caller has been released.
3032   * @throws { BusinessError } 16000073 - The app clone index is invalid.
3033   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3034   * @systemapi
3035   * @stagemodelonly
3036   * @since 12
3037   */
3038  startRecentAbility(want: Want, callback: AsyncCallback<void>): void;
3039
3040  /**
3041   * Service extension uses this method to start a specific ability,
3042   * if ability is multi instance, will start a recent instance.
3043   *
3044   * @param { Want } want - Indicates the ability to start.
3045   * @param { StartOptions } options - Indicates the start options.
3046   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3047   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3048   * 2. Incorrect parameter types; 3. Parameter verification failed.
3049   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3050   * @throws { BusinessError } 16000002 - Incorrect ability type.
3051   * @throws { BusinessError } 16000004 - Can not start invisible component.
3052   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3053   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3054   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3055   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3056   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3057   * @throws { BusinessError } 16000011 - The context does not exist.
3058   * @throws { BusinessError } 16000050 - Internal error.
3059   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3060   * @throws { BusinessError } 16000055 - Installation-free timed out.
3061   * @throws { BusinessError } 16200001 - The caller has been released.
3062   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3063   * @systemapi
3064   * @stagemodelonly
3065   * @since 9
3066   */
3067  /**
3068   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3069   * you can use this method to start ability; If the caller application is in the background,
3070   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3071   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3072   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3073   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3074   *
3075   * @param { Want } want - Indicates the ability to start.
3076   * @param { StartOptions } options - Indicates the start options.
3077   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3078   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3079   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3080   * 2. Incorrect parameter types; 3. Parameter verification failed.
3081   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3082   * @throws { BusinessError } 16000004 - Can not start invisible component.
3083   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3084   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3085   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3086   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3087   * @throws { BusinessError } 16000011 - The context does not exist.
3088   * @throws { BusinessError } 16000012 - The application is controlled.
3089   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3090   * @throws { BusinessError } 16000050 - Internal error.
3091   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3092   * @throws { BusinessError } 16000055 - Installation-free timed out.
3093   * @throws { BusinessError } 16200001 - The caller has been released.
3094   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3095   * @systemapi
3096   * @stagemodelonly
3097   * @since 10
3098   */
3099  /**
3100   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3101   * you can use this method to start ability; If the caller application is in the background,
3102   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3103   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3104   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3105   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3106   *
3107   * @param { Want } want - Indicates the ability to start.
3108   * @param { StartOptions } options - Indicates the start options.
3109   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3110   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3111   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3112   * 2. Incorrect parameter types; 3. Parameter verification failed.
3113   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3114   * @throws { BusinessError } 16000004 - Can not start invisible component.
3115   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3116   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3117   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3118   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3119   * @throws { BusinessError } 16000011 - The context does not exist.
3120   * @throws { BusinessError } 16000012 - The application is controlled.
3121   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3122   * @throws { BusinessError } 16000050 - Internal error.
3123   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3124   * @throws { BusinessError } 16000055 - Installation-free timed out.
3125   * @throws { BusinessError } 16200001 - The caller has been released.
3126   * @throws { BusinessError } 16000073 - The app clone index is invalid.
3127   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3128   * @systemapi
3129   * @stagemodelonly
3130   * @since 12
3131   */
3132  startRecentAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
3133
3134  /**
3135   * Service extension uses this method to start a specific ability,
3136   * if ability is multi instance, will start a recent instance.
3137   *
3138   * @param { Want } want - Indicates the ability to start.
3139   * @param { StartOptions } [options] - Indicates the start options.
3140   * @returns { Promise<void> } The promise returned by the function.
3141   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3142   * 2. Incorrect parameter types; 3. Parameter verification failed.
3143   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3144   * @throws { BusinessError } 16000002 - Incorrect ability type.
3145   * @throws { BusinessError } 16000004 - Can not start invisible component.
3146   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3147   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3148   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3149   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3150   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3151   * @throws { BusinessError } 16000011 - The context does not exist.
3152   * @throws { BusinessError } 16000050 - Internal error.
3153   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3154   * @throws { BusinessError } 16000055 - Installation-free timed out.
3155   * @throws { BusinessError } 16200001 - The caller has been released.
3156   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3157   * @systemapi
3158   * @stagemodelonly
3159   * @since 9
3160   */
3161  /**
3162   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3163   * you can use this method to start ability; If the caller application is in the background,
3164   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3165   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3166   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3167   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3168   *
3169   * @param { Want } want - Indicates the ability to start.
3170   * @param { StartOptions } [options] - Indicates the start options.
3171   * @returns { Promise<void> } The promise returned by the function.
3172   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3173   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3174   * 2. Incorrect parameter types; 3. Parameter verification failed.
3175   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3176   * @throws { BusinessError } 16000002 - Incorrect ability type.
3177   * @throws { BusinessError } 16000004 - Can not start invisible component.
3178   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3179   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3180   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3181   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3182   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3183   * @throws { BusinessError } 16000011 - The context does not exist.
3184   * @throws { BusinessError } 16000012 - The application is controlled.
3185   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3186   * @throws { BusinessError } 16000050 - Internal error.
3187   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3188   * @throws { BusinessError } 16000055 - Installation-free timed out.
3189   * @throws { BusinessError } 16200001 - The caller has been released.
3190   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3191   * @systemapi
3192   * @stagemodelonly
3193   * @since 10
3194   */
3195  /**
3196   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3197   * you can use this method to start ability; If the caller application is in the background,
3198   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3199   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3200   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3201   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3202   *
3203   * @param { Want } want - Indicates the ability to start.
3204   * @param { StartOptions } [options] - Indicates the start options.
3205   * @returns { Promise<void> } The promise returned by the function.
3206   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3207   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3208   * 2. Incorrect parameter types; 3. Parameter verification failed.
3209   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3210   * @throws { BusinessError } 16000002 - Incorrect ability type.
3211   * @throws { BusinessError } 16000004 - Can not start invisible component.
3212   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3213   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3214   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3215   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3216   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3217   * @throws { BusinessError } 16000011 - The context does not exist.
3218   * @throws { BusinessError } 16000012 - The application is controlled.
3219   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3220   * @throws { BusinessError } 16000050 - Internal error.
3221   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3222   * @throws { BusinessError } 16000055 - Installation-free timed out.
3223   * @throws { BusinessError } 16200001 - The caller has been released.
3224   * @throws { BusinessError } 16000073 - The app clone index is invalid.
3225   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3226   * @systemapi
3227   * @stagemodelonly
3228   * @since 12
3229   */
3230  startRecentAbility(want: Want, options?: StartOptions): Promise<void>;
3231
3232  /**
3233   * Requests certain permissions from the system.
3234   *
3235   * @param { Want } want - Indicates the dialog service to start.
3236   * @param { AsyncCallback<dialogRequest.RequestResult> } result - The callback is used to return the request result.
3237   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3238   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3239   * @throws { BusinessError } 16000002 - Incorrect ability type.
3240   * @throws { BusinessError } 16000004 - Can not start invisible component.
3241   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3242   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3243   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3244   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3245   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3246   * @throws { BusinessError } 16000011 - The context does not exist.
3247   * @throws { BusinessError } 16000050 - Internal error.
3248   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3249   * @throws { BusinessError } 16000055 - Installation-free timed out.
3250   * @throws { BusinessError } 16200001 - The caller has been released.
3251   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3252   * @stagemodelonly
3253   * @since 9
3254   */
3255  /**
3256   * Starts a service extension ability that supports modal dialog. If the caller application is in foreground,
3257   * you can use this method to start service extension ability; If the caller application is in the background,
3258   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3259   * If the target service extension ability is visible, you can start the target service extension ability;
3260   * If the target service extension ability is invisible,
3261   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
3262   *
3263   * @param { Want } want - Indicates the dialog service to start.
3264   * @param { AsyncCallback<dialogRequest.RequestResult> } result - The callback is used to return the request result.
3265   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3266   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3267   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3268   * @throws { BusinessError } 16000002 - Incorrect ability type.
3269   * @throws { BusinessError } 16000004 - Can not start invisible component.
3270   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3271   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3272   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3273   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3274   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3275   * @throws { BusinessError } 16000011 - The context does not exist.
3276   * @throws { BusinessError } 16000012 - The application is controlled.
3277   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3278   * @throws { BusinessError } 16000050 - Internal error.
3279   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3280   * @throws { BusinessError } 16000055 - Installation-free timed out.
3281   * @throws { BusinessError } 16200001 - The caller has been released.
3282   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3283   * @stagemodelonly
3284   * @since 10
3285   */
3286  requestDialogService(want: Want, result: AsyncCallback<dialogRequest.RequestResult>): void;
3287
3288  /**
3289   * Requests certain permissions from the system.
3290   *
3291   * @param { Want } want - Indicates the dialog service to start.
3292   * @returns { Promise<dialogRequest.RequestResult> } Returns the request result.
3293   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3294   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3295   * @throws { BusinessError } 16000002 - Incorrect ability type.
3296   * @throws { BusinessError } 16000004 - Can not start invisible component.
3297   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3298   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3299   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3300   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3301   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3302   * @throws { BusinessError } 16000011 - The context does not exist.
3303   * @throws { BusinessError } 16000050 - Internal error.
3304   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3305   * @throws { BusinessError } 16000055 - Installation-free timed out.
3306   * @throws { BusinessError } 16200001 - The caller has been released.
3307   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3308   * @stagemodelonly
3309   * @since 9
3310   */
3311  /**
3312   * Starts a service extension ability that supports modal dialog. If the caller application is in foreground,
3313   * you can use this method to start service extension ability; If the caller application is in the background,
3314   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3315   * If the target service extension ability is visible, you can start the target service extension ability;
3316   * If the target service extension ability is invisible,
3317   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service
3318   * extension ability.
3319   *
3320   * @param { Want } want - Indicates the dialog service to start.
3321   * @returns { Promise<dialogRequest.RequestResult> } Returns the request result.
3322   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3323   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3324   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3325   * @throws { BusinessError } 16000002 - Incorrect ability type.
3326   * @throws { BusinessError } 16000004 - Can not start invisible component.
3327   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3328   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3329   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3330   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3331   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3332   * @throws { BusinessError } 16000011 - The context does not exist.
3333   * @throws { BusinessError } 16000012 - The application is controlled.
3334   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3335   * @throws { BusinessError } 16000050 - Internal error.
3336   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3337   * @throws { BusinessError } 16000055 - Installation-free timed out.
3338   * @throws { BusinessError } 16200001 - The caller has been released.
3339   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3340   * @stagemodelonly
3341   * @since 10
3342   */
3343  requestDialogService(want: Want): Promise<dialogRequest.RequestResult>;
3344
3345  /**
3346   * Report to system when the ability is drawn completed.
3347   *
3348   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3349   * @throws { BusinessError } 16000011 - The context does not exist.
3350   * @throws { BusinessError } 16000050 - Internal error.
3351   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3352   * @stagemodelonly
3353   * @since 10
3354   */
3355  /**
3356   * Report to system when the ability is drawn completed.
3357   *
3358   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3359   * @throws { BusinessError } 16000011 - The context does not exist.
3360   * @throws { BusinessError } 16000050 - Internal error.
3361   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3362   * @stagemodelonly
3363   * @atomicservice
3364   * @since 11
3365   */
3366  /**
3367   * Report to system when the ability is drawn completed.
3368   *
3369   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3370   * @throws { BusinessError } 16000011 - The context does not exist.
3371   * @throws { BusinessError } 16000050 - Internal error.
3372   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3373   * @stagemodelonly
3374   * @crossplatform
3375   * @atomicservice
3376   * @since 12
3377   */
3378  reportDrawnCompleted(callback: AsyncCallback<void>): void;
3379
3380  /**
3381   * Starts the UIAbility or UIExtensionAbility by type.
3382   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3383   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3384   *
3385   * @param { string } type - The type of target ability.
3386   * @param { Record<string, Object> } wantParam - Indicates the want parameter.
3387   * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
3388   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3389   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3390   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
3391   * <br>2.Incorrect parameter types.
3392   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3393   * @throws { BusinessError } 16000002 - Incorrect ability type.
3394   * @throws { BusinessError } 16000004 - Can not start invisible component.
3395   * @throws { BusinessError } 16000050 - Internal error.
3396   * @throws { BusinessError } 16200001 - The caller has been released.
3397   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3398   * @stagemodelonly
3399   * @atomicservice
3400   * @since 11
3401   */
3402   /**
3403   * Starts the UIAbility or UIExtensionAbility by type.
3404   * If the caller application is in the background, it is not allowed to call this interface.
3405   *
3406   * @param { string } type - The type of target ability.
3407   * @param { Record<string, Object> } wantParam - Indicates the want parameter.
3408   * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
3409   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3410   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
3411   * <br>2.Incorrect parameter types.
3412   * @throws { BusinessError } 16000050 - Internal error.
3413   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3414   * @stagemodelonly
3415   * @atomicservice
3416   * @since 12
3417   */
3418  startAbilityByType(type: string, wantParam: Record<string, Object>,
3419    abilityStartCallback: AbilityStartCallback, callback: AsyncCallback<void>): void;
3420
3421  /**
3422   * Starts the UIAbility or UIExtensionAbility by type.
3423   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3424   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3425   *
3426   * @param { string } type - The type of target ability.
3427   * @param { Record<string, Object> } wantParam - Indicates the want parameter.
3428   * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
3429   * @returns { Promise<void> } The promise returned by the function.
3430   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3431   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
3432   * <br>2.Incorrect parameter types.
3433   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3434   * @throws { BusinessError } 16000002 - Incorrect ability type.
3435   * @throws { BusinessError } 16000004 - Can not start invisible component.
3436   * @throws { BusinessError } 16000050 - Internal error.
3437   * @throws { BusinessError } 16200001 - The caller has been released.
3438   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3439   * @stagemodelonly
3440   * @atomicservice
3441   * @since 11
3442   */
3443  /**
3444   * Starts the UIAbility or UIExtensionAbility by type.
3445   * If the caller application is in the background, it is not allowed to call this interface.
3446   *
3447   * @param { string } type - The type of target ability.
3448   * @param { Record<string, Object> } wantParam - Indicates the want parameter.
3449   * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
3450   * @returns { Promise<void> } The promise returned by the function.
3451   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
3452   * <br>2.Incorrect parameter types.
3453   * @throws { BusinessError } 16000050 - Internal error.
3454   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3455   * @stagemodelonly
3456   * @atomicservice
3457   * @since 12
3458   */
3459  startAbilityByType(type: string, wantParam: Record<string, Object>,
3460    abilityStartCallback: AbilityStartCallback): Promise<void>;
3461
3462  /**
3463   * Requests the Modal UIExtensionAbility.
3464   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
3465   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
3466   *
3467   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
3468   * @param { AsyncCallback<void> } callback - The callback of requestModalUIExtension.
3469   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3470   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3471   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3472   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3473   * @throws { BusinessError } 16000002 - Incorrect ability type.
3474   * @throws { BusinessError } 16000004 - Can not start invisible component.
3475   * @throws { BusinessError } 16000050 - Internal error.
3476   * @throws { BusinessError } 16200001 - The caller has been released.
3477   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3478   * @systemapi
3479   * @stagemodelonly
3480   * @since 11
3481   */
3482  /**
3483   * Requests the specified foreground application to start the UIExtensionAbility of the corresponding type. The foreground
3484   * application is specified by bundleName in want.parameters. If bundleName is left unspecified, or if the application
3485   * specified by bundleName is not running in the foreground or does not exist, the UIExtensionAbility is directly started
3486   * on the system interface. The UIExtensionAbility to start is determined by the combination of the bundleName, abilityName,
3487   * and moduleName fields in want, and its type is determined by the ability.want.params.uiExtensionType field in want.parameters.
3488   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
3489   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
3490   *
3491   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
3492   * @param { AsyncCallback<void> } callback - The callback of requestModalUIExtension.
3493   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3494   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3495   * @throws { BusinessError } 16000050 - Internal error.
3496   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3497   * @systemapi
3498   * @stagemodelonly
3499   * @since 12
3500   */
3501  requestModalUIExtension(pickerWant: Want, callback: AsyncCallback<void>): void;
3502
3503  /**
3504   * Requests the Modal UIExtensionAbility.
3505   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
3506   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
3507   *
3508   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
3509   * @returns { Promise<void> } The promise returned by the requestModalUIExtension.
3510   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3511   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3512   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3513   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3514   * @throws { BusinessError } 16000002 - Incorrect ability type.
3515   * @throws { BusinessError } 16000004 - Can not start invisible component.
3516   * @throws { BusinessError } 16000050 - Internal error.
3517   * @throws { BusinessError } 16200001 - The caller has been released.
3518   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3519   * @systemapi
3520   * @stagemodelonly
3521   * @since 11
3522   */
3523  /**
3524   * Requests the specified foreground application to start the UIExtensionAbility of the corresponding type. The foreground
3525   * application is specified by bundleName in want.parameters. If bundleName is left unspecified, or if the application
3526   * specified by bundleName is not running in the foreground or does not exist, the UIExtensionAbility is directly started
3527   * on the system interface. The UIExtensionAbility to start is determined by the combination of the bundleName, abilityName,
3528   * and moduleName fields in want, and its type is determined by the ability.want.params.uiExtensionType field in want.parameters.
3529   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
3530   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
3531   *
3532   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
3533   * @returns { Promise<void> } The promise returned by the requestModalUIExtension.
3534   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3535   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3536   * @throws { BusinessError } 16000050 - Internal error.
3537   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3538   * @systemapi
3539   * @stagemodelonly
3540   * @since 12
3541   */
3542  requestModalUIExtension(pickerWant: Want): Promise<void>;
3543
3544  /**
3545   * Full-screen pop-us startup atomic service.
3546   *
3547   * @param { string } appId - Globally unique identifier of an application, which is allocated by the cloud.
3548   * @param { AtomicServiceOptions } [options] - Indicates the atomic service start options.
3549   * @returns { Promise<AbilityResult> } Returns the result of openAtomicService.
3550   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3551   * @throws { BusinessError } 16000002 - Incorrect ability type.
3552   * @throws { BusinessError } 16000003 - The appId does not exist.
3553   * @throws { BusinessError } 16000004 - Can not start invisible component
3554   * @throws { BusinessError } 16000011 - The context does not exist.
3555   * @throws { BusinessError } 16000012 - The application is controlled.
3556   * @throws { BusinessError } 16000050 - Internal error.
3557   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3558   * @throws { BusinessError } 16000055 - Installation-free timed out.
3559   * @throws { BusinessError } 16200001 - The caller has been released.
3560   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3561   * @stagemodelonly
3562   * @atomicservice
3563   * @since 12
3564   */
3565  openAtomicService(appId: string, options?: AtomicServiceOptions): Promise<AbilityResult>;
3566
3567  /**
3568   * Move current ability to background.
3569   *
3570   * @returns { Promise<void> } Returns the result of moveAbilityToBackground.
3571   * @throws { BusinessError } 16000011 - The context does not exist.
3572   * @throws { BusinessError } 16000050 - Internal error.
3573   * @throws { BusinessError } 16000061 - Operation not supported.
3574   * @throws { BusinessError } 16000065 - The interface can be called only when ability is foreground.
3575   * @throws { BusinessError } 16000066 - An ability cannot move to foreground or background in Wukong mode.
3576   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3577   * @stagemodelonly
3578   * @atomicservice
3579   * @since 12
3580   */
3581  moveAbilityToBackground(): Promise<void>;
3582
3583  /**
3584   * Show current ability. The ability needs to be started by UIAbilityContext.startAbility
3585   * with input parameter options.processMode setting to NEW_PROCESS_ATTACH_TO_STATUS_BAR_ITEM.
3586   *
3587   * @returns { Promise<void> } The promise returned by the function.
3588   * @throws { BusinessError } 801 - Capability not support.
3589   * @throws { BusinessError } 16000050 - Internal error.
3590   * @throws { BusinessError } 16000067 - Start options check failed.
3591   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3592   * @stagemodelonly
3593   * @since 12
3594   */
3595  showAbility(): Promise<void>;
3596
3597  /**
3598   * Hide current ability. The ability needs to be started by UIAbilityContext.startAbility
3599   * with input parameter options.processMode setting to NEW_PROCESS_ATTACH_TO_STATUS_BAR_ITEM.
3600   *
3601   * @returns { Promise<void> } The promise returned by the function.
3602   * @throws { BusinessError } 801 - Capability not support.
3603   * @throws { BusinessError } 16000050 - Internal error.
3604   * @throws { BusinessError } 16000067 - Start options check failed.
3605   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3606   * @stagemodelonly
3607   * @since 12
3608   */
3609  hideAbility(): Promise<void>;
3610}
3611