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';
38import type UIServiceProxy from './UIServiceProxy';
39import type UIServiceExtensionConnectCallback from './UIServiceExtensionConnectCallback';
40
41/**
42 * The context of an ability. It allows access to ability-specific resources.
43 *
44 * @extends Context
45 * @syscap SystemCapability.Ability.AbilityRuntime.Core
46 * @stagemodelonly
47 * @since 9
48 */
49/**
50 * The context of an ability. It allows access to ability-specific resources.
51 *
52 * @extends Context
53 * @syscap SystemCapability.Ability.AbilityRuntime.Core
54 * @stagemodelonly
55 * @crossplatform
56 * @since 10
57 */
58/**
59 * The context of an ability. It allows access to ability-specific resources.
60 *
61 * @extends Context
62 * @syscap SystemCapability.Ability.AbilityRuntime.Core
63 * @stagemodelonly
64 * @crossplatform
65 * @atomicservice
66 * @since 11
67 */
68export default class UIAbilityContext extends Context {
69  /**
70   * Indicates configuration information about an ability.
71   *
72   * @type { AbilityInfo }
73   * @syscap SystemCapability.Ability.AbilityRuntime.Core
74   * @stagemodelonly
75   * @since 9
76   */
77  /**
78   * Indicates configuration information about an ability.
79   *
80   * @type { AbilityInfo }
81   * @syscap SystemCapability.Ability.AbilityRuntime.Core
82   * @stagemodelonly
83   * @crossplatform
84   * @since 10
85   */
86  /**
87   * Indicates configuration information about an ability.
88   *
89   * @type { AbilityInfo }
90   * @syscap SystemCapability.Ability.AbilityRuntime.Core
91   * @stagemodelonly
92   * @crossplatform
93   * @atomicservice
94   * @since 11
95   */
96  abilityInfo: AbilityInfo;
97
98  /**
99   * Indicates configuration information about the module.
100   *
101   * @type { HapModuleInfo }
102   * @syscap SystemCapability.Ability.AbilityRuntime.Core
103   * @stagemodelonly
104   * @since 9
105   */
106  /**
107   * Indicates configuration information about the module.
108   *
109   * @type { HapModuleInfo }
110   * @syscap SystemCapability.Ability.AbilityRuntime.Core
111   * @stagemodelonly
112   * @crossplatform
113   * @since 10
114   */
115  /**
116   * Indicates configuration information about the module.
117   *
118   * @type { HapModuleInfo }
119   * @syscap SystemCapability.Ability.AbilityRuntime.Core
120   * @stagemodelonly
121   * @crossplatform
122   * @atomicservice
123   * @since 11
124   */
125  currentHapModuleInfo: HapModuleInfo;
126
127  /**
128   * Indicates configuration information.
129   *
130   * @type { Configuration }
131   * @syscap SystemCapability.Ability.AbilityRuntime.Core
132   * @stagemodelonly
133   * @since 9
134   */
135  /**
136   * Indicates configuration information.
137   *
138   * @type { Configuration }
139   * @syscap SystemCapability.Ability.AbilityRuntime.Core
140   * @stagemodelonly
141   * @crossplatform
142   * @since 10
143   */
144  /**
145   * Indicates configuration information.
146   *
147   * @type { Configuration }
148   * @syscap SystemCapability.Ability.AbilityRuntime.Core
149   * @stagemodelonly
150   * @crossplatform
151   * @atomicservice
152   * @since 11
153   */
154  config: Configuration;
155
156  /**
157   * Indicates windowStage information.
158   * Exists from onWindowStageCreate lifecycle, does not exist from onWindowStageDestroy lifecycle.
159   *
160   * @type { window.WindowStage }
161   * @syscap SystemCapability.Ability.AbilityRuntime.Core
162   * @stagemodelonly
163   * @atomicservice
164   * @since 12
165   */
166  windowStage: window.WindowStage;
167
168  /**
169   * Starts a new ability.
170   *
171   * @param { Want } want - Indicates the ability to start.
172   * @param { AsyncCallback<void> } callback - The callback of startAbility.
173   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
174   * @throws { BusinessError } 16000001 - The specified ability does not exist.
175   * @throws { BusinessError } 16000002 - Incorrect ability type.
176   * @throws { BusinessError } 16000004 - Can not start invisible component.
177   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
178   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
179   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
180   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
181   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
182   * @throws { BusinessError } 16000011 - The context does not exist.
183   * @throws { BusinessError } 16000050 - Internal error.
184   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
185   * @throws { BusinessError } 16000055 - Installation-free timed out.
186   * @throws { BusinessError } 16200001 - The caller has been released.
187   * @syscap SystemCapability.Ability.AbilityRuntime.Core
188   * @stagemodelonly
189   * @since 9
190   */
191  /**
192   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
193   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
194   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
195   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
196   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
197   *
198   * @param { Want } want - Indicates the ability to start.
199   * @param { AsyncCallback<void> } callback - The callback of startAbility.
200   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
201   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
202   * @throws { BusinessError } 16000001 - The specified ability does not exist.
203   * @throws { BusinessError } 16000002 - Incorrect ability type.
204   * @throws { BusinessError } 16000004 - Can not start invisible component.
205   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
206   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
207   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
208   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
209   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
210   * @throws { BusinessError } 16000011 - The context does not exist.
211   * @throws { BusinessError } 16000012 - The application is controlled.
212   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
213   * @throws { BusinessError } 16000050 - Internal error.
214   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
215   * @throws { BusinessError } 16000055 - Installation-free timed out.
216   * @throws { BusinessError } 16200001 - The caller has been released.
217   * @syscap SystemCapability.Ability.AbilityRuntime.Core
218   * @stagemodelonly
219   * @crossplatform
220   * @since 10
221   */
222  /**
223   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
224   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
225   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
226   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
227   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
228   *
229   * @param { Want } want - Indicates the ability to start.
230   * @param { AsyncCallback<void> } callback - The callback of startAbility.
231   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
232   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
233   * @throws { BusinessError } 16000001 - The specified ability does not exist.
234   * @throws { BusinessError } 16000002 - Incorrect ability type.
235   * @throws { BusinessError } 16000004 - Can not start invisible component.
236   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
237   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
238   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
239   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
240   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
241   * @throws { BusinessError } 16000011 - The context does not exist.
242   * @throws { BusinessError } 16000012 - The application is controlled.
243   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
244   * @throws { BusinessError } 16000050 - Internal error.
245   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
246   * @throws { BusinessError } 16000055 - Installation-free timed out.
247   * @throws { BusinessError } 16200001 - The caller has been released.
248   * @syscap SystemCapability.Ability.AbilityRuntime.Core
249   * @stagemodelonly
250   * @crossplatform
251   * @atomicservice
252   * @since 11
253   */
254  /**
255   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
256   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
257   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
258   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
259   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
260   *
261   * @param { Want } want - Indicates the ability to start.
262   * @param { AsyncCallback<void> } callback - The callback of startAbility.
263   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
264   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
265   * @throws { BusinessError } 16000001 - The specified ability does not exist.
266   * @throws { BusinessError } 16000002 - Incorrect ability type.
267   * @throws { BusinessError } 16000004 - Can not start invisible component.
268   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
269   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
270   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
271   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
272   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
273   * @throws { BusinessError } 16000011 - The context does not exist.
274   * @throws { BusinessError } 16000012 - The application is controlled.
275   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
276   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
277   * @throws { BusinessError } 16000019 - Can not match any component.
278   * @throws { BusinessError } 16000050 - Internal error.
279   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
280   * @throws { BusinessError } 16000055 - Installation-free timed out.
281   * @throws { BusinessError } 16200001 - The caller has been released.
282   * @throws { BusinessError } 16000073 - The app clone index is invalid.
283   * @syscap SystemCapability.Ability.AbilityRuntime.Core
284   * @stagemodelonly
285   * @crossplatform
286   * @atomicservice
287   * @since 12
288   */
289  /**
290   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
291   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
292   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
293   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
294   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
295   *
296   * @param { Want } want - Indicates the ability to start.
297   * @param { AsyncCallback<void> } callback - The callback of startAbility.
298   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
299   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
300   * @throws { BusinessError } 16000001 - The specified ability does not exist.
301   * @throws { BusinessError } 16000002 - Incorrect ability type.
302   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
303   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
304   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
305   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
306   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
307   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
308   * @throws { BusinessError } 16000011 - The context does not exist.
309   * @throws { BusinessError } 16000012 - The application is controlled.
310   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
311   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version 11 or later.
312   * @throws { BusinessError } 16000019 - No matching ability is found.
313   * @throws { BusinessError } 16000050 - Internal error.
314   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
315   * @throws { BusinessError } 16000055 - Installation-free timed out.
316   * @throws { BusinessError } 16000071 - App clone is not supported.
317   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
318   * @throws { BusinessError } 16000073 - The app clone index is invalid.
319   * @throws { BusinessError } 16000076 - The app instance key is invalid.
320   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
321   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
322   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
323   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
324   * @throws { BusinessError } 16200001 - The caller has been released.
325   * @syscap SystemCapability.Ability.AbilityRuntime.Core
326   * @stagemodelonly
327   * @crossplatform
328   * @atomicservice
329   * @since 14
330   */
331  startAbility(want: Want, callback: AsyncCallback<void>): void;
332
333  /**
334   * Starts a new ability.
335   *
336   * @param { Want } want - Indicates the ability to start.
337   * @param { StartOptions } options - Indicates the start options.
338   * @param { AsyncCallback<void> } callback - The callback of startAbility.
339   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
340   * @throws { BusinessError } 16000001 - The specified ability does not exist.
341   * @throws { BusinessError } 16000002 - Incorrect ability type.
342   * @throws { BusinessError } 16000004 - Can not start invisible component.
343   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
344   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
345   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
346   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
347   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
348   * @throws { BusinessError } 16000011 - The context does not exist.
349   * @throws { BusinessError } 16000050 - Internal error.
350   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
351   * @throws { BusinessError } 16000055 - Installation-free timed out.
352   * @throws { BusinessError } 16200001 - The caller has been released.
353   * @syscap SystemCapability.Ability.AbilityRuntime.Core
354   * @stagemodelonly
355   * @since 9
356   */
357  /**
358   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
359   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
360   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
361   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
362   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
363   *
364   * @param { Want } want - Indicates the ability to start.
365   * @param { StartOptions } options - Indicates the start options.
366   * @param { AsyncCallback<void> } callback - The callback of startAbility.
367   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
368   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
369   * @throws { BusinessError } 16000001 - The specified ability does not exist.
370   * @throws { BusinessError } 16000004 - Can not start invisible component.
371   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
372   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
373   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
374   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
375   * @throws { BusinessError } 16000011 - The context does not exist.
376   * @throws { BusinessError } 16000012 - The application is controlled.
377   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
378   * @throws { BusinessError } 16000050 - Internal error.
379   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
380   * @throws { BusinessError } 16000055 - Installation-free timed out.
381   * @throws { BusinessError } 16200001 - The caller has been released.
382   * @syscap SystemCapability.Ability.AbilityRuntime.Core
383   * @stagemodelonly
384   * @since 10
385   */
386  /**
387   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
388   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
389   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
390   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
391   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
392   *
393   * @param { Want } want - Indicates the ability to start.
394   * @param { StartOptions } options - Indicates the start options.
395   * @param { AsyncCallback<void> } callback - The callback of startAbility.
396   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
397   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
398   * @throws { BusinessError } 16000001 - The specified ability does not exist.
399   * @throws { BusinessError } 16000004 - Can not start invisible component.
400   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
401   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
402   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
403   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
404   * @throws { BusinessError } 16000011 - The context does not exist.
405   * @throws { BusinessError } 16000012 - The application is controlled.
406   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
407   * @throws { BusinessError } 16000050 - Internal error.
408   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
409   * @throws { BusinessError } 16000055 - Installation-free timed out.
410   * @throws { BusinessError } 16200001 - The caller has been released.
411   * @syscap SystemCapability.Ability.AbilityRuntime.Core
412   * @stagemodelonly
413   * @atomicservice
414   * @since 11
415   */
416  /**
417   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
418   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
419   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
420   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
421   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
422   *
423   * @param { Want } want - Indicates the ability to start.
424   * @param { StartOptions } options - Indicates the start options.
425   * @param { AsyncCallback<void> } callback - The callback of startAbility.
426   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
427   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
428   * @throws { BusinessError } 801 - Capability not support.
429   * @throws { BusinessError } 16000001 - The specified ability does not exist.
430   * @throws { BusinessError } 16000004 - Can not start invisible component.
431   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
432   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
433   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
434   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
435   * @throws { BusinessError } 16000011 - The context does not exist.
436   * @throws { BusinessError } 16000012 - The application is controlled.
437   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
438   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
439   * @throws { BusinessError } 16000019 - Can not match any component.
440   * @throws { BusinessError } 16000050 - Internal error.
441   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
442   * @throws { BusinessError } 16000055 - Installation-free timed out.
443   * @throws { BusinessError } 16000067 - Start options check failed.
444   * @throws { BusinessError } 16000068 - Ability already running.
445   * @throws { BusinessError } 16200001 - The caller has been released.
446   * @throws { BusinessError } 16300003 - The target application is not self application.
447   * @throws { BusinessError } 16000073 - The app clone index is invalid.
448   * @syscap SystemCapability.Ability.AbilityRuntime.Core
449   * @stagemodelonly
450   * @atomicservice
451   * @since 12
452   */
453  /**
454   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
455   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
456   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
457   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
458   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
459   *
460   * @param { Want } want - Indicates the ability to start.
461   * @param { StartOptions } options - Indicates the start options.
462   * @param { AsyncCallback<void> } callback - The callback of startAbility.
463   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
464   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
465   * @throws { BusinessError } 801 - Capability not support.
466   * @throws { BusinessError } 16000001 - The specified ability does not exist.
467   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
468   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
469   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
470   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
471   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
472   * @throws { BusinessError } 16000011 - The context does not exist.
473   * @throws { BusinessError } 16000012 - The application is controlled.
474   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
475   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version 11 or later.
476   * @throws { BusinessError } 16000019 - No matching ability is found.
477   * @throws { BusinessError } 16000050 - Internal error.
478   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
479   * @throws { BusinessError } 16000055 - Installation-free timed out.
480   * @throws { BusinessError } 16000067 - The StartOptions check failed.
481   * @throws { BusinessError } 16000068 - The ability is already running.
482   * @throws { BusinessError } 16000071 - App clone is not supported.
483   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
484   * @throws { BusinessError } 16000073 - The app clone index is invalid.
485   * @throws { BusinessError } 16000076 - The app instance key is invalid.
486   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
487   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
488   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
489   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
490   * @throws { BusinessError } 16200001 - The caller has been released.
491   * @throws { BusinessError } 16300003 - The target application is not self application.
492   * @syscap SystemCapability.Ability.AbilityRuntime.Core
493   * @stagemodelonly
494   * @atomicservice
495   * @since 14
496   */
497  startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
498
499  /**
500   * Starts a new ability.
501   *
502   * @param { Want } want - Indicates the ability to start.
503   * @param { StartOptions } [options] - Indicates the start options.
504   * @returns { Promise<void> } The promise returned by the function.
505   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
506   * @throws { BusinessError } 16000001 - The specified ability does not exist.
507   * @throws { BusinessError } 16000002 - Incorrect ability type.
508   * @throws { BusinessError } 16000004 - Can not start invisible component.
509   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
510   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
511   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
512   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
513   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
514   * @throws { BusinessError } 16000011 - The context does not exist.
515   * @throws { BusinessError } 16000050 - Internal error.
516   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
517   * @throws { BusinessError } 16000055 - Installation-free timed out.
518   * @throws { BusinessError } 16200001 - The caller has been released.
519   * @syscap SystemCapability.Ability.AbilityRuntime.Core
520   * @stagemodelonly
521   * @crossplatform
522   * @since 9
523   */
524  /**
525   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
526   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
527   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
528   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
529   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
530   *
531   * @param { Want } want - Indicates the ability to start.
532   * @param { StartOptions } [options] - Indicates the start options.
533   * @returns { Promise<void> } The promise returned by the function.
534   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
535   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
536   * @throws { BusinessError } 16000001 - The specified ability does not exist.
537   * @throws { BusinessError } 16000002 - Incorrect ability type.
538   * @throws { BusinessError } 16000004 - Can not start invisible component.
539   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
540   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
541   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
542   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
543   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
544   * @throws { BusinessError } 16000011 - The context does not exist.
545   * @throws { BusinessError } 16000012 - The application is controlled.
546   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
547   * @throws { BusinessError } 16000050 - Internal error.
548   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
549   * @throws { BusinessError } 16000055 - Installation-free timed out.
550   * @throws { BusinessError } 16200001 - The caller has been released.
551   * @syscap SystemCapability.Ability.AbilityRuntime.Core
552   * @stagemodelonly
553   * @since 10
554   */
555  /**
556   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
557   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
558   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
559   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
560   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
561   *
562   * @param { Want } want - Indicates the ability to start.
563   * @param { StartOptions } [options] - Indicates the start options.
564   * @returns { Promise<void> } The promise returned by the function.
565   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
566   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
567   * @throws { BusinessError } 16000001 - The specified ability does not exist.
568   * @throws { BusinessError } 16000002 - Incorrect ability type.
569   * @throws { BusinessError } 16000004 - Can not start invisible component.
570   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
571   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
572   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
573   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
574   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
575   * @throws { BusinessError } 16000011 - The context does not exist.
576   * @throws { BusinessError } 16000012 - The application is controlled.
577   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
578   * @throws { BusinessError } 16000050 - Internal error.
579   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
580   * @throws { BusinessError } 16000055 - Installation-free timed out.
581   * @throws { BusinessError } 16200001 - The caller has been released.
582   * @syscap SystemCapability.Ability.AbilityRuntime.Core
583   * @stagemodelonly
584   * @atomicservice
585   * @since 11
586   */
587  /**
588   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
589   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
590   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
591   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
592   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
593   *
594   * @param { Want } want - Indicates the ability to start.
595   * @param { StartOptions } [options] - Indicates the start options.
596   * @returns { Promise<void> } The promise returned by the function.
597   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
598   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
599   * @throws { BusinessError } 801 - Capability not support.
600   * @throws { BusinessError } 16000001 - The specified ability does not exist.
601   * @throws { BusinessError } 16000002 - Incorrect ability type.
602   * @throws { BusinessError } 16000004 - Can not start invisible component.
603   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
604   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
605   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
606   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
607   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
608   * @throws { BusinessError } 16000011 - The context does not exist.
609   * @throws { BusinessError } 16000012 - The application is controlled.
610   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
611   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
612   * @throws { BusinessError } 16000019 - Can not match any component.
613   * @throws { BusinessError } 16000050 - Internal error.
614   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
615   * @throws { BusinessError } 16000055 - Installation-free timed out.
616   * @throws { BusinessError } 16000067 - Start options check failed.
617   * @throws { BusinessError } 16000068 - Ability already running.
618   * @throws { BusinessError } 16200001 - The caller has been released.
619   * @throws { BusinessError } 16300003 - The target application is not self application.
620   * @throws { BusinessError } 16000073 - The app clone index is invalid.
621   * @syscap SystemCapability.Ability.AbilityRuntime.Core
622   * @stagemodelonly
623   * @atomicservice
624   * @since 12
625   */
626  /**
627   * Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
628   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
629   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
630   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
631   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
632   *
633   * @param { Want } want - Indicates the ability to start.
634   * @param { StartOptions } [options] - Indicates the start options.
635   * @returns { Promise<void> } The promise returned by the function.
636   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
637   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
638   * @throws { BusinessError } 801 - Capability not support.
639   * @throws { BusinessError } 16000001 - The specified ability does not exist.
640   * @throws { BusinessError } 16000002 - Incorrect ability type.
641   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
642   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
643   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
644   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
645   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
646   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
647   * @throws { BusinessError } 16000011 - The context does not exist.
648   * @throws { BusinessError } 16000012 - The application is controlled.
649   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
650   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version 11 or later.
651   * @throws { BusinessError } 16000019 - No matching ability is found.
652   * @throws { BusinessError } 16000050 - Internal error.
653   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
654   * @throws { BusinessError } 16000055 - Installation-free timed out.
655   * @throws { BusinessError } 16000067 - The StartOptions check failed.
656   * @throws { BusinessError } 16000068 - The ability is already running.
657   * @throws { BusinessError } 16000071 - App clone is not supported.
658   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
659   * @throws { BusinessError } 16000073 - The app clone index is invalid.
660   * @throws { BusinessError } 16000076 - The app instance key is invalid.
661   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
662   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
663   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
664   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
665   * @throws { BusinessError } 16200001 - The caller has been released.
666   * @throws { BusinessError } 16300003 - The target application is not self application.
667   * @syscap SystemCapability.Ability.AbilityRuntime.Core
668   * @stagemodelonly
669   * @atomicservice
670   * @since 14
671   */
672  startAbility(want: Want, options?: StartOptions): Promise<void>;
673
674  /**
675   * Starts a new ability by implicit want. If the caller application is in foreground, you can use this method to start ability;
676   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
677   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
678   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
679   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
680   *
681   * @param { string } link - Indicates the ability to start.
682   * @param { OpenLinkOptions } [options] - Indicates the open link options.
683   * @param { AsyncCallback<AbilityResult> } [callback] - The callback is used to return the ability result.
684   * @returns { Promise<void> } The promise returned by the function.
685   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
686   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
687   * @throws { BusinessError } 16000001 - The specified ability does not exist.
688   * @throws { BusinessError } 16000002 - Incorrect ability type.
689   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
690   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
691   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
692   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
693   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
694   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
695   * @throws { BusinessError } 16000011 - The context does not exist.
696   * @throws { BusinessError } 16000012 - The application is controlled.
697   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
698   * @throws { BusinessError } 16000019 - No matching ability is found.
699   * @throws { BusinessError } 16200001 - The caller has been released.
700   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
701   * @syscap SystemCapability.Ability.AbilityRuntime.Core
702   * @stagemodelonly
703   * @atomicservice
704   * @since 12
705   */
706  openLink(link: string, options?: OpenLinkOptions, callback?: AsyncCallback<AbilityResult>): Promise<void>;
707
708  /**
709   * Starts a new ability using the original caller information. If the caller application is in foreground,
710   * you can use this method to start ability; If the caller application is in the background,
711   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
712   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
713   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
714   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
715   *
716   * @param { Want } want - Indicates the ability to start.
717   * @param { AsyncCallback<void> } callback - The callback of startAbility.
718   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
719   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
720   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified;
721   * 2. Incorrect parameter types; 3. Parameter verification failed.
722   * @throws { BusinessError } 16000001 - The specified ability does not exist.
723   * @throws { BusinessError } 16000002 - Incorrect ability type.
724   * @throws { BusinessError } 16000004 - Can not start invisible component.
725   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
726   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
727   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
728   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
729   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
730   * @throws { BusinessError } 16000011 - The context does not exist.
731   * @throws { BusinessError } 16000012 - The application is controlled.
732   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
733   * @throws { BusinessError } 16000050 - Internal error.
734   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
735   * @throws { BusinessError } 16000055 - Installation-free timed out.
736   * @throws { BusinessError } 16200001 - The caller has been released.
737   * @syscap SystemCapability.Ability.AbilityRuntime.Core
738   * @systemapi
739   * @stagemodelonly
740   * @since 10
741   */
742  /**
743   * Starts a new ability using the original caller information. If the caller application is in foreground,
744   * you can use this method to start ability; If the caller application is in the background,
745   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
746   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
747   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
748   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
749   *
750   * @param { Want } want - Indicates the ability to start.
751   * @param { AsyncCallback<void> } callback - The callback of startAbility.
752   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
753   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
754   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
755   * 2. Incorrect parameter types; 3. Parameter verification failed.
756   * @throws { BusinessError } 16000001 - The specified ability does not exist.
757   * @throws { BusinessError } 16000002 - Incorrect ability type.
758   * @throws { BusinessError } 16000004 - Can not start invisible component.
759   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
760   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
761   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
762   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
763   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
764   * @throws { BusinessError } 16000011 - The context does not exist.
765   * @throws { BusinessError } 16000012 - The application is controlled.
766   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
767   * @throws { BusinessError } 16000050 - Internal error.
768   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
769   * @throws { BusinessError } 16000055 - Installation-free timed out.
770   * @throws { BusinessError } 16200001 - The caller has been released.
771   * @throws { BusinessError } 16000073 - The app clone index is invalid.
772   * @syscap SystemCapability.Ability.AbilityRuntime.Core
773   * @systemapi
774   * @stagemodelonly
775   * @since 12
776   */
777  /**
778   * Starts a new ability using the original caller information. If the caller application is in foreground,
779   * you can use this method to start ability; If the caller application is in the background,
780   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
781   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
782   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
783   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
784   *
785   * @param { Want } want - Indicates the ability to start.
786   * @param { AsyncCallback<void> } callback - The callback of startAbility.
787   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
788   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
789   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
790   * 2. Incorrect parameter types; 3. Parameter verification failed.
791   * @throws { BusinessError } 16000001 - The specified ability does not exist.
792   * @throws { BusinessError } 16000002 - Incorrect ability type.
793   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
794   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
795   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
796   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
797   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
798   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
799   * @throws { BusinessError } 16000011 - The context does not exist.
800   * @throws { BusinessError } 16000012 - The application is controlled.
801   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
802   * @throws { BusinessError } 16000050 - Internal error.
803   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
804   * @throws { BusinessError } 16000055 - Installation-free timed out.
805   * @throws { BusinessError } 16000071 - App clone is not supported.
806   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
807   * @throws { BusinessError } 16000073 - The app clone index is invalid.
808   * @throws { BusinessError } 16000076 - The app instance key is invalid.
809   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
810   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
811   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
812   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
813   * @throws { BusinessError } 16200001 - The caller has been released.
814   * @syscap SystemCapability.Ability.AbilityRuntime.Core
815   * @systemapi
816   * @stagemodelonly
817   * @since 14
818   */
819  startAbilityAsCaller(want: Want, callback: AsyncCallback<void>): void;
820
821  /**
822   * Starts a new ability using the original caller information. If the caller application is in foreground,
823   * you can use this method to start ability; If the caller application is in the background,
824   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
825   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
826   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
827   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
828   *
829   * @param { Want } want - Indicates the ability to start.
830   * @param { StartOptions } options - Indicates the start options.
831   * @param { AsyncCallback<void> } callback - The callback of startAbility.
832   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
833   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
834   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified;
835   * 2. Incorrect parameter types; 3. Parameter verification failed.
836   * @throws { BusinessError } 16000001 - The specified ability does not exist.
837   * @throws { BusinessError } 16000004 - Can not start invisible component.
838   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
839   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
840   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
841   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
842   * @throws { BusinessError } 16000011 - The context does not exist.
843   * @throws { BusinessError } 16000012 - The application is controlled.
844   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
845   * @throws { BusinessError } 16000050 - Internal error.
846   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
847   * @throws { BusinessError } 16000055 - Installation-free timed out.
848   * @throws { BusinessError } 16200001 - The caller has been released.
849   * @syscap SystemCapability.Ability.AbilityRuntime.Core
850   * @systemapi
851   * @stagemodelonly
852   * @since 10
853   */
854  /**
855   * Starts a new ability using the original caller information. If the caller application is in foreground,
856   * you can use this method to start ability; If the caller application is in the background,
857   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
858   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
859   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
860   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
861   *
862   * @param { Want } want - Indicates the ability to start.
863   * @param { StartOptions } options - Indicates the start options.
864   * @param { AsyncCallback<void> } callback - The callback of startAbility.
865   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
866   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
867   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
868   * 2. Incorrect parameter types; 3. Parameter verification failed.
869   * @throws { BusinessError } 16000001 - The specified ability does not exist.
870   * @throws { BusinessError } 16000004 - Can not start invisible component.
871   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
872   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
873   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
874   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
875   * @throws { BusinessError } 16000011 - The context does not exist.
876   * @throws { BusinessError } 16000012 - The application is controlled.
877   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
878   * @throws { BusinessError } 16000050 - Internal error.
879   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
880   * @throws { BusinessError } 16000055 - Installation-free timed out.
881   * @throws { BusinessError } 16200001 - The caller has been released.
882   * @throws { BusinessError } 16000073 - The app clone index is invalid.
883   * @syscap SystemCapability.Ability.AbilityRuntime.Core
884   * @systemapi
885   * @stagemodelonly
886   * @since 12
887   */
888  /**
889   * Starts a new ability using the original caller information. If the caller application is in foreground,
890   * you can use this method to start ability; If the caller application is in the background,
891   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
892   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
893   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
894   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
895   *
896   * @param { Want } want - Indicates the ability to start.
897   * @param { StartOptions } options - Indicates the start options.
898   * @param { AsyncCallback<void> } callback - The callback of startAbility.
899   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
900   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
901   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
902   * 2. Incorrect parameter types; 3. Parameter verification failed.
903   * @throws { BusinessError } 16000001 - The specified ability does not exist.
904   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
905   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
906   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
907   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
908   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
909   * @throws { BusinessError } 16000011 - The context does not exist.
910   * @throws { BusinessError } 16000012 - The application is controlled.
911   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
912   * @throws { BusinessError } 16000050 - Internal error.
913   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
914   * @throws { BusinessError } 16000055 - Installation-free timed out.
915   * @throws { BusinessError } 16000071 - App clone is not supported.
916   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
917   * @throws { BusinessError } 16000073 - The app clone index is invalid.
918   * @throws { BusinessError } 16000076 - The app instance key is invalid.
919   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
920   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
921   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
922   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
923   * @throws { BusinessError } 16200001 - The caller has been released.
924   * @syscap SystemCapability.Ability.AbilityRuntime.Core
925   * @systemapi
926   * @stagemodelonly
927   * @since 14
928   */
929  startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
930
931  /**
932   * Starts a new ability using the original caller information. If the caller application is in foreground,
933   * you can use this method to start ability; If the caller application is in the background,
934   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
935   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
936   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
937   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
938   *
939   * @param { Want } want - Indicates the ability to start.
940   * @param { StartOptions } options - Indicates the start options.
941   * @returns { Promise<void> } The promise returned by the function.
942   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
943   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
944   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
945   * 2. Incorrect parameter types; 3. Parameter verification failed.
946   * @throws { BusinessError } 16000001 - The specified ability does not exist.
947   * @throws { BusinessError } 16000002 - Incorrect ability type.
948   * @throws { BusinessError } 16000004 - Can not start invisible component.
949   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
950   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
951   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
952   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
953   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
954   * @throws { BusinessError } 16000011 - The context does not exist.
955   * @throws { BusinessError } 16000012 - The application is controlled.
956   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
957   * @throws { BusinessError } 16000050 - Internal error.
958   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
959   * @throws { BusinessError } 16000055 - Installation-free timed out.
960   * @throws { BusinessError } 16200001 - The caller has been released.
961   * @syscap SystemCapability.Ability.AbilityRuntime.Core
962   * @systemapi
963   * @stagemodelonly
964   * @since 10
965   */
966  /**
967   * Starts a new ability using the original caller information. If the caller application is in foreground,
968   * you can use this method to start ability; If the caller application is in the background,
969   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
970   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
971   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
972   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
973   *
974   * @param { Want } want - Indicates the ability to start.
975   * @param { StartOptions } options - Indicates the start options.
976   * @returns { Promise<void> } The promise returned by the function.
977   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
978   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
979   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
980   * 2. Incorrect parameter types; 3. Parameter verification failed.
981   * @throws { BusinessError } 16000001 - The specified ability does not exist.
982   * @throws { BusinessError } 16000002 - Incorrect ability type.
983   * @throws { BusinessError } 16000004 - Can not start invisible component.
984   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
985   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
986   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
987   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
988   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
989   * @throws { BusinessError } 16000011 - The context does not exist.
990   * @throws { BusinessError } 16000012 - The application is controlled.
991   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
992   * @throws { BusinessError } 16000050 - Internal error.
993   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
994   * @throws { BusinessError } 16000055 - Installation-free timed out.
995   * @throws { BusinessError } 16200001 - The caller has been released.
996   * @throws { BusinessError } 16000073 - The app clone index is invalid.
997   * @syscap SystemCapability.Ability.AbilityRuntime.Core
998   * @systemapi
999   * @stagemodelonly
1000   * @since 12
1001   */
1002  /**
1003   * Starts a new ability using the original caller information. If the caller application is in foreground,
1004   * you can use this method to start ability; If the caller application is in the background,
1005   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1006   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1007   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1008   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1009   *
1010   * @param { Want } want - Indicates the ability to start.
1011   * @param { StartOptions } options - Indicates the start options.
1012   * @returns { Promise<void> } The promise returned by the function.
1013   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1014   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1015   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1016   * 2. Incorrect parameter types; 3. Parameter verification failed.
1017   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1018   * @throws { BusinessError } 16000002 - Incorrect ability type.
1019   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
1020   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1021   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1022   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1023   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1024   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
1025   * @throws { BusinessError } 16000011 - The context does not exist.
1026   * @throws { BusinessError } 16000012 - The application is controlled.
1027   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1028   * @throws { BusinessError } 16000050 - Internal error.
1029   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1030   * @throws { BusinessError } 16000055 - Installation-free timed out.
1031   * @throws { BusinessError } 16000071 - App clone is not supported.
1032   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
1033   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1034   * @throws { BusinessError } 16000076 - The app instance key is invalid.
1035   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
1036   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
1037   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
1038   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
1039   * @throws { BusinessError } 16200001 - The caller has been released.
1040   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1041   * @systemapi
1042   * @stagemodelonly
1043   * @since 14
1044   */
1045  startAbilityAsCaller(want: Want, options?: StartOptions): Promise<void>;
1046
1047  /**
1048   * Get the caller object of the startup capability.
1049   *
1050   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
1051   * @param { Want } want - Indicates the ability to start.
1052   * @returns { Promise<Caller> } Returns the Caller interface.
1053   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1054   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1055   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1056   * @throws { BusinessError } 16000002 - Incorrect ability type.
1057   * @throws { BusinessError } 16000004 - Can not start invisible component.
1058   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1059   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1060   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1061   * @throws { BusinessError } 16000011 - The context does not exist.
1062   * @throws { BusinessError } 16000050 - Internal error.
1063   * @throws { BusinessError } 16200001 - The caller has been released.
1064   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1065   * @stagemodelonly
1066   * @since 9
1067   */
1068  /**
1069   * Get the caller object of the startup capability.
1070   * If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION to use this method.
1071   * If the caller application is in foreground, you can use this method to start ability;
1072   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1073   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1074   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1075   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1076   *
1077   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
1078   * @param { Want } want - Indicates the ability to start.
1079   * @returns { Promise<Caller> } Returns the Caller interface.
1080   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1081   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1082   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1083   * @throws { BusinessError } 16000002 - Incorrect ability type.
1084   * @throws { BusinessError } 16000004 - Can not start invisible component.
1085   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1086   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1087   * @throws { BusinessError } 16000011 - The context does not exist.
1088   * @throws { BusinessError } 16000012 - The application is controlled.
1089   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1090   * @throws { BusinessError } 16000050 - Internal error.
1091   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1092   * @stagemodelonly
1093   * @since 10
1094   */
1095  /**
1096   * Get the caller object of the startup capability in cross-device.
1097   *
1098   * If the caller application is in foreground, you can use this method to start ability;
1099   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1100   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1101   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1102   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1103   *
1104   * @permission ohos.permission.DISTRIBUTED_DATASYNC
1105   * @param { Want } want - Indicates the ability to start.
1106   * @returns { Promise<Caller> } Returns the Caller interface.
1107   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1108   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1109   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1110   * @throws { BusinessError } 16000002 - Incorrect ability type.
1111   * @throws { BusinessError } 16000004 - Can not start invisible component.
1112   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1113   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1114   * @throws { BusinessError } 16000011 - The context does not exist.
1115   * @throws { BusinessError } 16000012 - The application is controlled.
1116   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1117   * @throws { BusinessError } 16000050 - Internal error.
1118   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1119   * @stagemodelonly
1120   * @since 11
1121   */
1122  /**
1123   * Get the caller object of the startup capability in cross-device.
1124   *
1125   * If the caller application is in foreground, you can use this method to start ability;
1126   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1127   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1128   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1129   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1130   *
1131   * @permission ohos.permission.DISTRIBUTED_DATASYNC
1132   * @param { Want } want - Indicates the ability to start.
1133   * @returns { Promise<Caller> } Returns the Caller interface.
1134   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1135   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1136   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1137   * @throws { BusinessError } 16000002 - Incorrect ability type.
1138   * @throws { BusinessError } 16000004 - Can not start invisible component.
1139   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1140   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1141   * @throws { BusinessError } 16000011 - The context does not exist.
1142   * @throws { BusinessError } 16000012 - The application is controlled.
1143   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1144   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
1145   * @throws { BusinessError } 16000050 - Internal error.
1146   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1147   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1148   * @stagemodelonly
1149   * @since 12
1150   */
1151  /**
1152   * Get the caller object of the startup capability in cross-device.
1153   *
1154   * If the caller application is in foreground, you can use this method to start ability;
1155   * If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1156   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1157   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1158   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1159   *
1160   * @permission ohos.permission.DISTRIBUTED_DATASYNC
1161   * @param { Want } want - Indicates the ability to start.
1162   * @returns { Promise<Caller> } Returns the Caller interface.
1163   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1164   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1165   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1166   * @throws { BusinessError } 16000002 - Incorrect ability type.
1167   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
1168   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1169   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1170   * @throws { BusinessError } 16000011 - The context does not exist.
1171   * @throws { BusinessError } 16000012 - The application is controlled.
1172   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1173   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version 11 or later.
1174   * @throws { BusinessError } 16000050 - Internal error.
1175   * @throws { BusinessError } 16000071 - App clone is not supported.
1176   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
1177   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1178   * @throws { BusinessError } 16000076 - The app instance key is invalid.
1179   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
1180   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
1181   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
1182   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
1183   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1184   * @stagemodelonly
1185   * @since 14
1186   */
1187  startAbilityByCall(want: Want): Promise<Caller>;
1188
1189  /**
1190   * Get the caller object that specifies the accountId startup capability
1191   * If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
1192   * and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS to use this method.
1193   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
1194   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1195   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1196   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1197   *
1198   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1199   * @param { Want } want - Indicates the ability to start.
1200   * @param { number } accountId - Indicates the account to start.
1201   * @returns { Promise<Caller> } Returns the Caller interface.
1202   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1203   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1204   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1205   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1206   * @throws { BusinessError } 16000002 - Incorrect ability type.
1207   * @throws { BusinessError } 16000004 - Can not start invisible component.
1208   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1209   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1210   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1211   * @throws { BusinessError } 16000011 - The context does not exist.
1212   * @throws { BusinessError } 16000012 - The application is controlled.
1213   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1214   * @throws { BusinessError } 16000050 - Internal error.
1215   * @throws { BusinessError } 16200001 - The caller has been released.
1216   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1217   * @systemapi
1218   * @stagemodelonly
1219   * @since 10
1220   */
1221  /**
1222   * Get the caller object that specifies the accountId startup capability
1223   * If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
1224   * and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS to use this method.
1225   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
1226   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1227   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1228   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1229   *
1230   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1231   * @param { Want } want - Indicates the ability to start.
1232   * @param { number } accountId - Indicates the account to start.
1233   * @returns { Promise<Caller> } Returns the Caller interface.
1234   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1235   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1236   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1237   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1238   * @throws { BusinessError } 16000002 - Incorrect ability type.
1239   * @throws { BusinessError } 16000004 - Can not start invisible component.
1240   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1241   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1242   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1243   * @throws { BusinessError } 16000011 - The context does not exist.
1244   * @throws { BusinessError } 16000012 - The application is controlled.
1245   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1246   * @throws { BusinessError } 16000050 - Internal error.
1247   * @throws { BusinessError } 16200001 - The caller has been released.
1248   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1249   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1250   * @systemapi
1251   * @stagemodelonly
1252   * @since 12
1253   */
1254  /**
1255   * Get the caller object that specifies the accountId startup capability
1256   * If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
1257   * and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS to use this method.
1258   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
1259   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1260   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1261   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1262   *
1263   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1264   * @param { Want } want - Indicates the ability to start.
1265   * @param { number } accountId - Indicates the account to start.
1266   * @returns { Promise<Caller> } Returns the Caller interface.
1267   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1268   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1269   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1270   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1271   * @throws { BusinessError } 16000002 - Incorrect ability type.
1272   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
1273   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1274   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1275   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1276   * @throws { BusinessError } 16000011 - The context does not exist.
1277   * @throws { BusinessError } 16000012 - The application is controlled.
1278   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1279   * @throws { BusinessError } 16000050 - Internal error.
1280   * @throws { BusinessError } 16000071 - App clone is not supported.
1281   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
1282   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1283   * @throws { BusinessError } 16000076 - The app instance key is invalid.
1284   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
1285   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
1286   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
1287   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
1288   * @throws { BusinessError } 16200001 - The caller has been released.
1289   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1290   * @systemapi
1291   * @stagemodelonly
1292   * @since 14
1293   */
1294  startAbilityByCallWithAccount(want: Want, accountId: number): Promise<Caller>;
1295
1296  /**
1297   * Starts a new ability with account. If the caller application is in foreground,
1298   * you can use this method to start ability; If the caller application is in the background,
1299   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1300   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1301   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1302   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1303   *
1304   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1305   * @param { Want } want - Indicates the want info to start.
1306   * @param { number } accountId - Indicates the account to start.
1307   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
1308   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1309   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1310   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1311   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1312   * @throws { BusinessError } 16000002 - Incorrect ability type.
1313   * @throws { BusinessError } 16000004 - Can not start invisible component.
1314   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1315   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1316   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1317   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1318   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1319   * @throws { BusinessError } 16000011 - The context does not exist.
1320   * @throws { BusinessError } 16000012 - The application is controlled.
1321   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
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   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1327   * @systemapi
1328   * @stagemodelonly
1329   * @since 9
1330   */
1331  /**
1332   * Starts a new ability with account. If the caller application is in foreground,
1333   * you can use this method to start ability; If the caller application is in the background,
1334   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1335   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1336   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1337   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1338   *
1339   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1340   * @param { Want } want - Indicates the want info to start.
1341   * @param { number } accountId - Indicates the account to start.
1342   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
1343   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1344   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1345   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1346   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1347   * @throws { BusinessError } 16000002 - Incorrect ability type.
1348   * @throws { BusinessError } 16000004 - Can not start invisible component.
1349   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1350   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1351   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1352   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1353   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
1354   * @throws { BusinessError } 16000011 - The context does not exist.
1355   * @throws { BusinessError } 16000012 - The application is controlled.
1356   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1357   * @throws { BusinessError } 16000019 - Can not match any component.
1358   * @throws { BusinessError } 16000050 - Internal error.
1359   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1360   * @throws { BusinessError } 16000055 - Installation-free timed out.
1361   * @throws { BusinessError } 16200001 - The caller has been released.
1362   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1363   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1364   * @systemapi
1365   * @stagemodelonly
1366   * @since 12
1367   */
1368  /**
1369   * Starts a new ability with account. If the caller application is in foreground,
1370   * you can use this method to start ability; If the caller application is in the background,
1371   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1372   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1373   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1374   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1375   *
1376   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1377   * @param { Want } want - Indicates the want info to start.
1378   * @param { number } accountId - Indicates the account to start.
1379   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
1380   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1381   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1382   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1383   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1384   * @throws { BusinessError } 16000002 - Incorrect ability type.
1385   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
1386   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1387   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1388   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1389   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1390   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
1391   * @throws { BusinessError } 16000011 - The context does not exist.
1392   * @throws { BusinessError } 16000012 - The application is controlled.
1393   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1394   * @throws { BusinessError } 16000019 - No matching ability is found.
1395   * @throws { BusinessError } 16000050 - Internal error.
1396   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1397   * @throws { BusinessError } 16000055 - Installation-free timed out.
1398   * @throws { BusinessError } 16000071 - App clone is not supported.
1399   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
1400   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1401   * @throws { BusinessError } 16000076 - The app instance key is invalid.
1402   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
1403   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
1404   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
1405   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
1406   * @throws { BusinessError } 16200001 - The caller has been released.
1407   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1408   * @systemapi
1409   * @stagemodelonly
1410   * @since 14
1411   */
1412  startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
1413
1414  /**
1415   * Starts a new ability with account.
1416   *
1417   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1418   * @param { Want } want - Indicates the want info to start.
1419   * @param { number } accountId - Indicates the account to start.
1420   * @param { StartOptions } options - Indicates the start options.
1421   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
1422   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1423   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1424   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1425   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1426   * @throws { BusinessError } 16000002 - Incorrect ability type.
1427   * @throws { BusinessError } 16000004 - Can not start invisible component.
1428   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1429   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1430   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1431   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1432   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1433   * @throws { BusinessError } 16000011 - The context does not exist.
1434   * @throws { BusinessError } 16000050 - Internal error.
1435   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1436   * @throws { BusinessError } 16000055 - Installation-free timed out.
1437   * @throws { BusinessError } 16200001 - The caller has been released.
1438   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1439   * @systemapi
1440   * @stagemodelonly
1441   * @since 9
1442   */
1443  /**
1444   * Starts a new ability with account. If the caller application is in foreground,
1445   * you can use this method to start ability; If the caller application is in the background,
1446   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1447   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1448   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1449   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1450   *
1451   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1452   * @param { Want } want - Indicates the want info to start.
1453   * @param { number } accountId - Indicates the account to start.
1454   * @param { StartOptions } options - Indicates the start options.
1455   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
1456   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1457   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1458   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1459   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1460   * @throws { BusinessError } 16000004 - Can not start invisible component.
1461   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1462   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1463   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1464   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1465   * @throws { BusinessError } 16000011 - The context does not exist.
1466   * @throws { BusinessError } 16000012 - The application is controlled.
1467   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1468   * @throws { BusinessError } 16000050 - Internal error.
1469   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1470   * @throws { BusinessError } 16000055 - Installation-free timed out.
1471   * @throws { BusinessError } 16200001 - The caller has been released.
1472   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1473   * @systemapi
1474   * @stagemodelonly
1475   * @since 10
1476   */
1477  /**
1478   * Starts a new ability with account. If the caller application is in foreground,
1479   * you can use this method to start ability; If the caller application is in the background,
1480   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1481   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1482   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1483   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1484   *
1485   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1486   * @param { Want } want - Indicates the want info to start.
1487   * @param { number } accountId - Indicates the account to start.
1488   * @param { StartOptions } options - Indicates the start options.
1489   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
1490   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1491   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1492   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1493   * @throws { BusinessError } 16000001 - The specified ability does not exist.
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 } 16000011 - The context does not exist.
1500   * @throws { BusinessError } 16000012 - The application is controlled.
1501   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1502   * @throws { BusinessError } 16000019 - Can not match any component.
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   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1508   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1509   * @systemapi
1510   * @stagemodelonly
1511   * @since 12
1512   */
1513  /**
1514   * Starts a new ability with account. If the caller application is in foreground,
1515   * you can use this method to start ability; If the caller application is in the background,
1516   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1517   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1518   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1519   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1520   *
1521   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1522   * @param { Want } want - Indicates the want info to start.
1523   * @param { number } accountId - Indicates the account to start.
1524   * @param { StartOptions } options - Indicates the start options.
1525   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
1526   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1527   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1528   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1529   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1530   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
1531   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1532   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1533   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1534   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1535   * @throws { BusinessError } 16000011 - The context does not exist.
1536   * @throws { BusinessError } 16000012 - The application is controlled.
1537   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1538   * @throws { BusinessError } 16000019 - No matching ability is found.
1539   * @throws { BusinessError } 16000050 - Internal error.
1540   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1541   * @throws { BusinessError } 16000055 - Installation-free timed out.
1542   * @throws { BusinessError } 16000071 - App clone is not supported.
1543   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
1544   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1545   * @throws { BusinessError } 16000076 - The app instance key is invalid.
1546   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
1547   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
1548   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
1549   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
1550   * @throws { BusinessError } 16200001 - The caller has been released.
1551   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1552   * @systemapi
1553   * @stagemodelonly
1554   * @since 14
1555   */
1556  startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback<void>): void;
1557
1558  /**
1559   * Starts a new ability with account. If the caller application is in foreground,
1560   * you can use this method to start ability; If the caller application is in the background,
1561   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1562   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1563   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1564   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1565   *
1566   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1567   * @param { Want } want - Indicates the want info to start.
1568   * @param { number } accountId - Indicates the account to start.
1569   * @param { StartOptions } [options] - Indicates the start options.
1570   * @returns { Promise<void> } The promise returned by the function.
1571   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1572   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1573   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1574   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1575   * @throws { BusinessError } 16000002 - Incorrect ability type.
1576   * @throws { BusinessError } 16000004 - Can not start invisible component.
1577   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1578   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1579   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1580   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1581   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1582   * @throws { BusinessError } 16000011 - The context does not exist.
1583   * @throws { BusinessError } 16000012 - The application is controlled.
1584   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1585   * @throws { BusinessError } 16000050 - Internal error.
1586   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1587   * @throws { BusinessError } 16000055 - Installation-free timed out.
1588   * @throws { BusinessError } 16200001 - The caller has been released.
1589   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1590   * @systemapi
1591   * @stagemodelonly
1592   * @since 9
1593   */
1594  /**
1595   * Starts a new ability with account. If the caller application is in foreground,
1596   * you can use this method to start ability; If the caller application is in the background,
1597   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1598   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1599   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1600   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1601   *
1602   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1603   * @param { Want } want - Indicates the want info to start.
1604   * @param { number } accountId - Indicates the account to start.
1605   * @param { StartOptions } [options] - Indicates the start options.
1606   * @returns { Promise<void> } The promise returned by the function.
1607   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1608   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1609   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1610   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1611   * @throws { BusinessError } 16000002 - Incorrect ability type.
1612   * @throws { BusinessError } 16000004 - Can not start invisible component.
1613   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1614   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1615   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1616   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1617   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
1618   * @throws { BusinessError } 16000011 - The context does not exist.
1619   * @throws { BusinessError } 16000012 - The application is controlled.
1620   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1621   * @throws { BusinessError } 16000019 - Can not match any component.
1622   * @throws { BusinessError } 16000050 - Internal error.
1623   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1624   * @throws { BusinessError } 16000055 - Installation-free timed out.
1625   * @throws { BusinessError } 16200001 - The caller has been released.
1626   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1627   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1628   * @systemapi
1629   * @stagemodelonly
1630   * @since 12
1631   */
1632  /**
1633   * Starts a new ability with account. If the caller application is in foreground,
1634   * you can use this method to start ability; If the caller application is in the background,
1635   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1636   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1637   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1638   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1639   *
1640   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1641   * @param { Want } want - Indicates the want info to start.
1642   * @param { number } accountId - Indicates the account to start.
1643   * @param { StartOptions } [options] - Indicates the start options.
1644   * @returns { Promise<void> } The promise returned by the function.
1645   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1646   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1647   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1648   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1649   * @throws { BusinessError } 16000002 - Incorrect ability type.
1650   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
1651   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1652   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1653   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1654   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1655   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
1656   * @throws { BusinessError } 16000011 - The context does not exist.
1657   * @throws { BusinessError } 16000012 - The application is controlled.
1658   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1659   * @throws { BusinessError } 16000019 - No matching ability is found.
1660   * @throws { BusinessError } 16000050 - Internal error.
1661   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1662   * @throws { BusinessError } 16000055 - Installation-free timed out.
1663   * @throws { BusinessError } 16000071 - App clone is not supported.
1664   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
1665   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1666   * @throws { BusinessError } 16000076 - The app instance key is invalid.
1667   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
1668   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
1669   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
1670   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
1671   * @throws { BusinessError } 16200001 - The caller has been released.
1672   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1673   * @systemapi
1674   * @stagemodelonly
1675   * @since 14
1676   */
1677  startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise<void>;
1678
1679  /**
1680   * Starts an ability and returns the execution result when the ability is destroyed.
1681   *
1682   * @param { Want } want - Indicates the ability to start.
1683   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1684   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1685   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1686   * @throws { BusinessError } 16000002 - Incorrect ability type.
1687   * @throws { BusinessError } 16000004 - Can not start invisible component.
1688   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1689   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1690   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1691   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1692   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1693   * @throws { BusinessError } 16000011 - The context does not exist.
1694   * @throws { BusinessError } 16000050 - Internal error.
1695   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1696   * @throws { BusinessError } 16000055 - Installation-free timed out.
1697   * @throws { BusinessError } 16200001 - The caller has been released.
1698   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1699   * @stagemodelonly
1700   * @since 9
1701   */
1702  /**
1703   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1704   * you can use this method to start ability; If the caller application is in the background,
1705   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1706   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1707   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1708   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1709   *
1710   * @param { Want } want - Indicates the ability to start.
1711   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1712   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1713   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1714   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1715   * @throws { BusinessError } 16000002 - Incorrect ability type.
1716   * @throws { BusinessError } 16000004 - Can not start invisible component.
1717   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1718   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1719   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1720   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1721   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1722   * @throws { BusinessError } 16000011 - The context does not exist.
1723   * @throws { BusinessError } 16000012 - The application is controlled.
1724   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1725   * @throws { BusinessError } 16000050 - Internal error.
1726   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1727   * @throws { BusinessError } 16000055 - Installation-free timed out.
1728   * @throws { BusinessError } 16200001 - The caller has been released.
1729   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1730   * @stagemodelonly
1731   * @since 10
1732   */
1733  /**
1734   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1735   * you can use this method to start ability; If the caller application is in the background,
1736   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1737   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1738   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1739   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1740   *
1741   * @param { Want } want - Indicates the ability to start.
1742   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1743   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1744   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1745   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1746   * @throws { BusinessError } 16000002 - Incorrect ability type.
1747   * @throws { BusinessError } 16000004 - Can not start invisible component.
1748   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1749   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1750   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1751   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1752   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1753   * @throws { BusinessError } 16000011 - The context does not exist.
1754   * @throws { BusinessError } 16000012 - The application is controlled.
1755   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1756   * @throws { BusinessError } 16000050 - Internal error.
1757   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1758   * @throws { BusinessError } 16000055 - Installation-free timed out.
1759   * @throws { BusinessError } 16200001 - The caller has been released.
1760   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1761   * @stagemodelonly
1762   * @atomicservice
1763   * @since 11
1764   */
1765  /**
1766   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1767   * you can use this method to start ability; If the caller application is in the background,
1768   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1769   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1770   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1771   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1772   *
1773   * @param { Want } want - Indicates the ability to start.
1774   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1775   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1776   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1777   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1778   * @throws { BusinessError } 16000002 - Incorrect ability type.
1779   * @throws { BusinessError } 16000004 - Can not start invisible component.
1780   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1781   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1782   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1783   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1784   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
1785   * @throws { BusinessError } 16000011 - The context does not exist.
1786   * @throws { BusinessError } 16000012 - The application is controlled.
1787   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1788   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
1789   * @throws { BusinessError } 16000019 - Can not match any component.
1790   * @throws { BusinessError } 16000050 - Internal error.
1791   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1792   * @throws { BusinessError } 16000055 - Installation-free timed out.
1793   * @throws { BusinessError } 16200001 - The caller has been released.
1794   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1795   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1796   * @stagemodelonly
1797   * @atomicservice
1798   * @since 12
1799   */
1800  /**
1801   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1802   * you can use this method to start ability; If the caller application is in the background,
1803   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1804   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1805   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1806   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1807   *
1808   * @param { Want } want - Indicates the ability to start.
1809   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1810   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1811   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1812   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1813   * @throws { BusinessError } 16000002 - Incorrect ability type.
1814   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
1815   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1816   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1817   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1818   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1819   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
1820   * @throws { BusinessError } 16000011 - The context does not exist.
1821   * @throws { BusinessError } 16000012 - The application is controlled.
1822   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1823   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version 11 or later.
1824   * @throws { BusinessError } 16000019 - No matching ability is found.
1825   * @throws { BusinessError } 16000050 - Internal error.
1826   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1827   * @throws { BusinessError } 16000055 - Installation-free timed out.
1828   * @throws { BusinessError } 16000071 - App clone is not supported.
1829   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
1830   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1831   * @throws { BusinessError } 16000076 - The app instance key is invalid.
1832   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
1833   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
1834   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
1835   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
1836   * @throws { BusinessError } 16200001 - The caller has been released.
1837   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1838   * @stagemodelonly
1839   * @atomicservice
1840   * @since 14
1841   */
1842  startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): void;
1843
1844  /**
1845   * Starts an ability and returns the execution result when the ability is destroyed.
1846   *
1847   * @param { Want } want - Indicates the ability to start.
1848   * @param { StartOptions } options - Indicates the start options.
1849   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1850   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1851   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1852   * @throws { BusinessError } 16000002 - Incorrect ability type.
1853   * @throws { BusinessError } 16000004 - Can not start invisible component.
1854   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1855   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1856   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1857   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1858   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
1859   * @throws { BusinessError } 16000011 - The context does not exist.
1860   * @throws { BusinessError } 16000050 - Internal error.
1861   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1862   * @throws { BusinessError } 16000055 - Installation-free timed out.
1863   * @throws { BusinessError } 16200001 - The caller has been released.
1864   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1865   * @stagemodelonly
1866   * @since 9
1867   */
1868  /**
1869   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1870   * you can use this method to start ability; If the caller application is in the background,
1871   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1872   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1873   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1874   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1875   *
1876   * @param { Want } want - Indicates the ability to start.
1877   * @param { StartOptions } options - Indicates the start options.
1878   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1879   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1880   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1881   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1882   * @throws { BusinessError } 16000004 - Can not start invisible component.
1883   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1884   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1885   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1886   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1887   * @throws { BusinessError } 16000011 - The context does not exist.
1888   * @throws { BusinessError } 16000012 - The application is controlled.
1889   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1890   * @throws { BusinessError } 16000050 - Internal error.
1891   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1892   * @throws { BusinessError } 16000055 - Installation-free timed out.
1893   * @throws { BusinessError } 16200001 - The caller has been released.
1894   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1895   * @stagemodelonly
1896   * @since 10
1897   */
1898  /**
1899   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1900   * you can use this method to start ability; If the caller application is in the background,
1901   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1902   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1903   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1904   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1905   *
1906   * @param { Want } want - Indicates the ability to start.
1907   * @param { StartOptions } options - Indicates the start options.
1908   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1909   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1910   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1911   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1912   * @throws { BusinessError } 16000004 - Can not start invisible component.
1913   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1914   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1915   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1916   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1917   * @throws { BusinessError } 16000011 - The context does not exist.
1918   * @throws { BusinessError } 16000012 - The application is controlled.
1919   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1920   * @throws { BusinessError } 16000050 - Internal error.
1921   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1922   * @throws { BusinessError } 16000055 - Installation-free timed out.
1923   * @throws { BusinessError } 16200001 - The caller has been released.
1924   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1925   * @stagemodelonly
1926   * @atomicservice
1927   * @since 11
1928   */
1929  /**
1930   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1931   * you can use this method to start ability; If the caller application is in the background,
1932   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1933   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1934   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1935   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1936   *
1937   * @param { Want } want - Indicates the ability to start.
1938   * @param { StartOptions } options - Indicates the start options.
1939   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1940   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1941   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1942   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1943   * @throws { BusinessError } 16000004 - Can not start invisible component.
1944   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1945   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1946   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1947   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1948   * @throws { BusinessError } 16000011 - The context does not exist.
1949   * @throws { BusinessError } 16000012 - The application is controlled.
1950   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1951   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
1952   * @throws { BusinessError } 16000019 - Can not match any component.
1953   * @throws { BusinessError } 16000050 - Internal error.
1954   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1955   * @throws { BusinessError } 16000055 - Installation-free timed out.
1956   * @throws { BusinessError } 16200001 - The caller has been released.
1957   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1958   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1959   * @stagemodelonly
1960   * @atomicservice
1961   * @since 12
1962   */
1963  /**
1964   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
1965   * you can use this method to start ability; If the caller application is in the background,
1966   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
1967   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
1968   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1969   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1970   *
1971   * @param { Want } want - Indicates the ability to start.
1972   * @param { StartOptions } options - Indicates the start options.
1973   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
1974   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1975   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1976   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1977   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
1978   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1979   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1980   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1981   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1982   * @throws { BusinessError } 16000011 - The context does not exist.
1983   * @throws { BusinessError } 16000012 - The application is controlled.
1984   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1985   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version 11 or later.
1986   * @throws { BusinessError } 16000019 - No matching ability is found.
1987   * @throws { BusinessError } 16000050 - Internal error.
1988   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
1989   * @throws { BusinessError } 16000055 - Installation-free timed out.
1990   * @throws { BusinessError } 16000071 - App clone is not supported.
1991   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
1992   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1993   * @throws { BusinessError } 16000076 - The app instance key is invalid.
1994   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
1995   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
1996   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
1997   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
1998   * @throws { BusinessError } 16200001 - The caller has been released.
1999   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2000   * @stagemodelonly
2001   * @atomicservice
2002   * @since 14
2003   */
2004  startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback<AbilityResult>): void;
2005
2006  /**
2007   * Starts an ability and returns the execution result when the ability is destroyed.
2008   *
2009   * @param { Want } want - Indicates the ability to start.
2010   * @param { StartOptions } [options] - Indicates the start options.
2011   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
2012   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2013   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2014   * @throws { BusinessError } 16000002 - Incorrect ability type.
2015   * @throws { BusinessError } 16000004 - Can not start invisible component.
2016   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2017   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2018   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2019   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2020   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
2021   * @throws { BusinessError } 16000011 - The context does not exist.
2022   * @throws { BusinessError } 16000050 - Internal error.
2023   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2024   * @throws { BusinessError } 16000055 - Installation-free timed out.
2025   * @throws { BusinessError } 16200001 - The caller has been released.
2026   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2027   * @stagemodelonly
2028   * @since 9
2029   */
2030  /**
2031   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
2032   * you can use this method to start ability; If the caller application is in the background,
2033   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
2034   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
2035   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
2036   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2037   *
2038   * @param { Want } want - Indicates the ability to start.
2039   * @param { StartOptions } [options] - Indicates the start options.
2040   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
2041   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2042   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2043   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2044   * @throws { BusinessError } 16000002 - Incorrect ability type.
2045   * @throws { BusinessError } 16000004 - Can not start invisible component.
2046   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2047   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2048   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2049   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2050   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
2051   * @throws { BusinessError } 16000011 - The context does not exist.
2052   * @throws { BusinessError } 16000012 - The application is controlled.
2053   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2054   * @throws { BusinessError } 16000050 - Internal error.
2055   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2056   * @throws { BusinessError } 16000055 - Installation-free timed out.
2057   * @throws { BusinessError } 16200001 - The caller has been released.
2058   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2059   * @stagemodelonly
2060   * @since 10
2061   */
2062  /**
2063   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
2064   * you can use this method to start ability; If the caller application is in the background,
2065   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
2066   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
2067   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
2068   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2069   *
2070   * @param { Want } want - Indicates the ability to start.
2071   * @param { StartOptions } [options] - Indicates the start options.
2072   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
2073   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2074   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2075   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2076   * @throws { BusinessError } 16000002 - Incorrect ability type.
2077   * @throws { BusinessError } 16000004 - Can not start invisible component.
2078   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2079   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2080   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2081   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2082   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
2083   * @throws { BusinessError } 16000011 - The context does not exist.
2084   * @throws { BusinessError } 16000012 - The application is controlled.
2085   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2086   * @throws { BusinessError } 16000050 - Internal error.
2087   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2088   * @throws { BusinessError } 16000055 - Installation-free timed out.
2089   * @throws { BusinessError } 16200001 - The caller has been released.
2090   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2091   * @stagemodelonly
2092   * @atomicservice
2093   * @since 11
2094   */
2095  /**
2096   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
2097   * you can use this method to start ability; If the caller application is in the background,
2098   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
2099   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
2100   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
2101   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2102   *
2103   * @param { Want } want - Indicates the ability to start.
2104   * @param { StartOptions } [options] - Indicates the start options.
2105   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
2106   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2107   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2108   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2109   * @throws { BusinessError } 16000002 - Incorrect ability type.
2110   * @throws { BusinessError } 16000004 - Can not start invisible component.
2111   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2112   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2113   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2114   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2115   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
2116   * @throws { BusinessError } 16000011 - The context does not exist.
2117   * @throws { BusinessError } 16000012 - The application is controlled.
2118   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2119   * @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
2120   * @throws { BusinessError } 16000019 - Can not match any component.
2121   * @throws { BusinessError } 16000050 - Internal error.
2122   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2123   * @throws { BusinessError } 16000055 - Installation-free timed out.
2124   * @throws { BusinessError } 16200001 - The caller has been released.
2125   * @throws { BusinessError } 16000073 - The app clone index is invalid.
2126   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2127   * @stagemodelonly
2128   * @atomicservice
2129   * @since 12
2130   */
2131  /**
2132   * Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
2133   * you can use this method to start ability; If the caller application is in the background,
2134   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
2135   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
2136   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
2137   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2138   *
2139   * @param { Want } want - Indicates the ability to start.
2140   * @param { StartOptions } [options] - Indicates the start options.
2141   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
2142   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2143   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2144   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2145   * @throws { BusinessError } 16000002 - Incorrect ability type.
2146   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
2147   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2148   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2149   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2150   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2151   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
2152   * @throws { BusinessError } 16000011 - The context does not exist.
2153   * @throws { BusinessError } 16000012 - The application is controlled.
2154   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2155   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version 11 or later.
2156   * @throws { BusinessError } 16000019 - No matching ability is found.
2157   * @throws { BusinessError } 16000050 - Internal error.
2158   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2159   * @throws { BusinessError } 16000055 - Installation-free timed out.
2160   * @throws { BusinessError } 16000071 - App clone is not supported.
2161   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
2162   * @throws { BusinessError } 16000073 - The app clone index is invalid.
2163   * @throws { BusinessError } 16000076 - The app instance key is invalid.
2164   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
2165   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
2166   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
2167   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
2168   * @throws { BusinessError } 16200001 - The caller has been released.
2169   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2170   * @stagemodelonly
2171   * @atomicservice
2172   * @since 14
2173   */
2174  startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityResult>;
2175
2176  /**
2177   * Starts an ability and returns the execution result when the ability is destroyed with account.
2178   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
2179   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
2180   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
2181   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
2182   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2183   *
2184   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2185   * @param { Want } want - Indicates the want info to start.
2186   * @param { number } accountId - Indicates the account to start.
2187   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
2188   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2189   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2190   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2191   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2192   * @throws { BusinessError } 16000002 - Incorrect ability type.
2193   * @throws { BusinessError } 16000004 - Can not start invisible component.
2194   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2195   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2196   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2197   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2198   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
2199   * @throws { BusinessError } 16000011 - The context does not exist.
2200   * @throws { BusinessError } 16000050 - Internal error.
2201   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2202   * @throws { BusinessError } 16000055 - Installation-free timed out.
2203   * @throws { BusinessError } 16200001 - The caller has been released.
2204   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2205   * @systemapi
2206   * @stagemodelonly
2207   * @since 9
2208   */
2209  /**
2210   * Starts an ability and returns the execution result when the ability is destroyed with account.
2211   *
2212   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2213   * @param { Want } want - Indicates the want info to start.
2214   * @param { number } accountId - Indicates the account to start.
2215   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
2216   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2217   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2218   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2219   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2220   * @throws { BusinessError } 16000002 - Incorrect ability type.
2221   * @throws { BusinessError } 16000004 - Can not start invisible component.
2222   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2223   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2224   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2225   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2226   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
2227   * @throws { BusinessError } 16000011 - The context does not exist.
2228   * @throws { BusinessError } 16000012 - The application is controlled.
2229   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2230   * @throws { BusinessError } 16000050 - Internal error.
2231   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2232   * @throws { BusinessError } 16000055 - Installation-free timed out.
2233   * @throws { BusinessError } 16200001 - The caller has been released.
2234   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2235   * @systemapi
2236   * @stagemodelonly
2237   * @since 10
2238   */
2239  /**
2240   * Starts an ability and returns the execution result when the ability is destroyed with account.
2241   *
2242   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2243   * @param { Want } want - Indicates the want info to start.
2244   * @param { number } accountId - Indicates the account to start.
2245   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
2246   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2247   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2248   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2249   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2250   * @throws { BusinessError } 16000002 - Incorrect ability type.
2251   * @throws { BusinessError } 16000004 - Can not start invisible component.
2252   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2253   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2254   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2255   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2256   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
2257   * @throws { BusinessError } 16000011 - The context does not exist.
2258   * @throws { BusinessError } 16000012 - The application is controlled.
2259   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2260   * @throws { BusinessError } 16000019 - Can not match any component.
2261   * @throws { BusinessError } 16000050 - Internal error.
2262   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2263   * @throws { BusinessError } 16000055 - Installation-free timed out.
2264   * @throws { BusinessError } 16200001 - The caller has been released.
2265   * @throws { BusinessError } 16000073 - The app clone index is invalid.
2266   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2267   * @systemapi
2268   * @stagemodelonly
2269   * @since 12
2270   */
2271  /**
2272   * Starts an ability and returns the execution result when the ability is destroyed with account.
2273   *
2274   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2275   * @param { Want } want - Indicates the want info to start.
2276   * @param { number } accountId - Indicates the account to start.
2277   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
2278   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2279   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2280   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2281   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2282   * @throws { BusinessError } 16000002 - Incorrect ability type.
2283   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
2284   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2285   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2286   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2287   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2288   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
2289   * @throws { BusinessError } 16000011 - The context does not exist.
2290   * @throws { BusinessError } 16000012 - The application is controlled.
2291   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2292   * @throws { BusinessError } 16000019 - No matching ability is found.
2293   * @throws { BusinessError } 16000050 - Internal error.
2294   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2295   * @throws { BusinessError } 16000055 - Installation-free timed out.
2296   * @throws { BusinessError } 16000071 - App clone is not supported.
2297   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
2298   * @throws { BusinessError } 16000073 - The app clone index is invalid.
2299   * @throws { BusinessError } 16000076 - The app instance key is invalid.
2300   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
2301   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
2302   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
2303   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
2304   * @throws { BusinessError } 16200001 - The caller has been released.
2305   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2306   * @systemapi
2307   * @stagemodelonly
2308   * @since 14
2309   */
2310  startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback<AbilityResult>): void;
2311
2312  /**
2313   * Starts an ability and returns the execution result when the ability is destroyed with account.
2314   *
2315   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2316   * @param { Want } want - Indicates the want info to start.
2317   * @param { number } accountId - Indicates the account to start.
2318   * @param { StartOptions } options - Indicates the start options.
2319   * @param { AsyncCallback<void> } callback - The callback is used to return the result of startAbility.
2320   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2321   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2322   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2323   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2324   * @throws { BusinessError } 16000002 - Incorrect ability type.
2325   * @throws { BusinessError } 16000004 - Can not start invisible component.
2326   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2327   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2328   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2329   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2330   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
2331   * @throws { BusinessError } 16000011 - The context does not exist.
2332   * @throws { BusinessError } 16000050 - Internal error.
2333   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2334   * @throws { BusinessError } 16000055 - Installation-free timed out.
2335   * @throws { BusinessError } 16200001 - The caller has been released.
2336   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2337   * @systemapi
2338   * @stagemodelonly
2339   * @since 9
2340   */
2341  /**
2342   * Starts an ability and returns the execution result when the ability is destroyed with account.
2343   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
2344   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
2345   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
2346   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
2347   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2348   *
2349   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2350   * @param { Want } want - Indicates the want info to start.
2351   * @param { number } accountId - Indicates the account to start.
2352   * @param { StartOptions } options - Indicates the start options.
2353   * @param { AsyncCallback<void> } callback - The callback is used to return the result of startAbility.
2354   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2355   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2356   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2357   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2358   * @throws { BusinessError } 16000004 - Can not start invisible component.
2359   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2360   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2361   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2362   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2363   * @throws { BusinessError } 16000011 - The context does not exist.
2364   * @throws { BusinessError } 16000012 - The application is controlled.
2365   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2366   * @throws { BusinessError } 16000050 - Internal error.
2367   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2368   * @throws { BusinessError } 16000055 - Installation-free timed out.
2369   * @throws { BusinessError } 16200001 - The caller has been released.
2370   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2371   * @systemapi
2372   * @stagemodelonly
2373   * @since 10
2374   */
2375  /**
2376   * Starts an ability and returns the execution result when the ability is destroyed with account.
2377   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
2378   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
2379   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
2380   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
2381   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2382   *
2383   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2384   * @param { Want } want - Indicates the want info to start.
2385   * @param { number } accountId - Indicates the account to start.
2386   * @param { StartOptions } options - Indicates the start options.
2387   * @param { AsyncCallback<void> } callback - The callback is used to return the result of startAbility.
2388   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2389   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2390   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2391   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2392   * @throws { BusinessError } 16000004 - Can not start invisible component.
2393   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2394   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2395   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2396   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2397   * @throws { BusinessError } 16000011 - The context does not exist.
2398   * @throws { BusinessError } 16000012 - The application is controlled.
2399   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2400   * @throws { BusinessError } 16000019 - Can not match any component.
2401   * @throws { BusinessError } 16000050 - Internal error.
2402   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2403   * @throws { BusinessError } 16000055 - Installation-free timed out.
2404   * @throws { BusinessError } 16200001 - The caller has been released.
2405   * @throws { BusinessError } 16000073 - The app clone index is invalid.
2406   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2407   * @systemapi
2408   * @stagemodelonly
2409   * @since 12
2410   */
2411  /**
2412   * Starts an ability and returns the execution result when the ability is destroyed with account.
2413   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
2414   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
2415   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
2416   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
2417   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2418   *
2419   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2420   * @param { Want } want - Indicates the want info to start.
2421   * @param { number } accountId - Indicates the account to start.
2422   * @param { StartOptions } options - Indicates the start options.
2423   * @param { AsyncCallback<void> } callback - The callback is used to return the result of startAbility.
2424   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2425   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2426   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2427   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2428   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
2429   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2430   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2431   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2432   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2433   * @throws { BusinessError } 16000011 - The context does not exist.
2434   * @throws { BusinessError } 16000012 - The application is controlled.
2435   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2436   * @throws { BusinessError } 16000019 - No matching ability is found.
2437   * @throws { BusinessError } 16000050 - Internal error.
2438   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2439   * @throws { BusinessError } 16000055 - Installation-free timed out.
2440   * @throws { BusinessError } 16000071 - App clone is not supported.
2441   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
2442   * @throws { BusinessError } 16000073 - The app clone index is invalid.
2443   * @throws { BusinessError } 16000076 - The app instance key is invalid.
2444   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
2445   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
2446   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
2447   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
2448   * @throws { BusinessError } 16200001 - The caller has been released.
2449   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2450   * @systemapi
2451   * @stagemodelonly
2452   * @since 14
2453   */
2454  startAbilityForResultWithAccount(
2455    want: Want,
2456    accountId: number,
2457    options: StartOptions,
2458    callback: AsyncCallback<void>
2459  ): void;
2460
2461  /**
2462   * Starts an ability and returns the execution result when the ability is destroyed with account.
2463   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
2464   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
2465   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
2466   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
2467   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2468   *
2469   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2470   * @param { Want } want - Indicates the want info to start.
2471   * @param { number } accountId - Indicates the account to start.
2472   * @param { StartOptions } [options] - Indicates the start options.
2473   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
2474   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2475   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2476   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2477   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2478   * @throws { BusinessError } 16000002 - Incorrect ability type.
2479   * @throws { BusinessError } 16000004 - Can not start invisible component.
2480   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2481   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2482   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2483   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2484   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
2485   * @throws { BusinessError } 16000011 - The context does not exist.
2486   * @throws { BusinessError } 16000050 - Internal error.
2487   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2488   * @throws { BusinessError } 16000055 - Installation-free timed out.
2489   * @throws { BusinessError } 16200001 - The caller has been released.
2490   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2491   * @systemapi
2492   * @stagemodelonly
2493   * @since 9
2494   */
2495  /**
2496   * Starts an ability and returns the execution result when the ability is destroyed with account.
2497   *
2498   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2499   * @param { Want } want - Indicates the want info to start.
2500   * @param { number } accountId - Indicates the account to start.
2501   * @param { StartOptions } [options] - Indicates the start options.
2502   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
2503   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2504   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2505   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2506   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2507   * @throws { BusinessError } 16000002 - Incorrect ability type.
2508   * @throws { BusinessError } 16000004 - Can not start invisible component.
2509   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2510   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2511   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2512   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2513   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
2514   * @throws { BusinessError } 16000011 - The context does not exist.
2515   * @throws { BusinessError } 16000012 - The application is controlled.
2516   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2517   * @throws { BusinessError } 16000050 - Internal error.
2518   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2519   * @throws { BusinessError } 16000055 - Installation-free timed out.
2520   * @throws { BusinessError } 16200001 - The caller has been released.
2521   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2522   * @systemapi
2523   * @stagemodelonly
2524   * @since 10
2525   */
2526  /**
2527   * Starts an ability and returns the execution result when the ability is destroyed with account.
2528   *
2529   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2530   * @param { Want } want - Indicates the want info to start.
2531   * @param { number } accountId - Indicates the account to start.
2532   * @param { StartOptions } [options] - Indicates the start options.
2533   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
2534   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2535   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2536   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2537   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2538   * @throws { BusinessError } 16000002 - Incorrect ability type.
2539   * @throws { BusinessError } 16000004 - Can not start invisible component.
2540   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2541   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2542   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2543   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2544   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
2545   * @throws { BusinessError } 16000011 - The context does not exist.
2546   * @throws { BusinessError } 16000012 - The application is controlled.
2547   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2548   * @throws { BusinessError } 16000019 - Can not match any component.
2549   * @throws { BusinessError } 16000050 - Internal error.
2550   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2551   * @throws { BusinessError } 16000055 - Installation-free timed out.
2552   * @throws { BusinessError } 16200001 - The caller has been released.
2553   * @throws { BusinessError } 16000073 - The app clone index is invalid.
2554   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2555   * @systemapi
2556   * @stagemodelonly
2557   * @since 12
2558   */
2559  /**
2560   * Starts an ability and returns the execution result when the ability is destroyed with account.
2561   *
2562   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2563   * @param { Want } want - Indicates the want info to start.
2564   * @param { number } accountId - Indicates the account to start.
2565   * @param { StartOptions } [options] - Indicates the start options.
2566   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
2567   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2568   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2569   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2570   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2571   * @throws { BusinessError } 16000002 - Incorrect ability type.
2572   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
2573   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2574   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2575   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2576   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
2577   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
2578   * @throws { BusinessError } 16000011 - The context does not exist.
2579   * @throws { BusinessError } 16000012 - The application is controlled.
2580   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2581   * @throws { BusinessError } 16000019 - No matching ability is found.
2582   * @throws { BusinessError } 16000050 - Internal error.
2583   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
2584   * @throws { BusinessError } 16000055 - Installation-free timed out.
2585   * @throws { BusinessError } 16000071 - App clone is not supported.
2586   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
2587   * @throws { BusinessError } 16000073 - The app clone index is invalid.
2588   * @throws { BusinessError } 16000076 - The app instance key is invalid.
2589   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
2590   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
2591   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
2592   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
2593   * @throws { BusinessError } 16200001 - The caller has been released.
2594   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2595   * @systemapi
2596   * @stagemodelonly
2597   * @since 14
2598   */
2599  startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartOptions): Promise<AbilityResult>;
2600
2601  /**
2602   * Starts a new service extension ability.
2603   *
2604   * @param { Want } want - Indicates the want info to start.
2605   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
2606   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2607   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2608   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2609   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2610   * @throws { BusinessError } 16000002 - Incorrect ability type.
2611   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2612   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2613   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2614   * @throws { BusinessError } 16000011 - The context does not exist.
2615   * @throws { BusinessError } 16000050 - Internal error.
2616   * @throws { BusinessError } 16200001 - The caller has been released.
2617   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2618   * @systemapi
2619   * @stagemodelonly
2620   * @since 9
2621   */
2622  /**
2623   * Starts a new service extension ability.
2624   * If the target service extension ability is visible, you can start the target service extension ability;
2625   * If the target service extension ability is invisible,
2626   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2627   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2628   *
2629   * @param { Want } want - Indicates the want info to start.
2630   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
2631   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2632   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2633   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2634   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2635   * @throws { BusinessError } 16000002 - Incorrect ability type.
2636   * @throws { BusinessError } 16000004 - Can not start invisible component.
2637   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2638   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2639   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2640   * @throws { BusinessError } 16000011 - The context does not exist.
2641   * @throws { BusinessError } 16000012 - The application is controlled.
2642   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2643   * @throws { BusinessError } 16000050 - Internal error.
2644   * @throws { BusinessError } 16200001 - The caller has been released.
2645   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2646   * @systemapi
2647   * @stagemodelonly
2648   * @since 10
2649   */
2650  /**
2651   * Starts a new service extension ability.
2652   * If the target service extension ability is visible, you can start the target service extension ability;
2653   * If the target service extension ability is invisible,
2654   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2655   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2656   *
2657   * @param { Want } want - Indicates the want info to start.
2658   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
2659   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2660   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2661   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2662   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2663   * @throws { BusinessError } 16000002 - Incorrect ability type.
2664   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
2665   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2666   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2667   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2668   * @throws { BusinessError } 16000011 - The context does not exist.
2669   * @throws { BusinessError } 16000012 - The application is controlled.
2670   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2671   * @throws { BusinessError } 16000019 - No matching ability is found.
2672   * @throws { BusinessError } 16000050 - Internal error.
2673   * @throws { BusinessError } 16200001 - The caller has been released.
2674   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2675   * @systemapi
2676   * @stagemodelonly
2677   * @since 12
2678   */
2679  startServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void;
2680
2681  /**
2682   * Starts a new service extension ability.
2683   *
2684   * @param { Want } want - Indicates the want info to start.
2685   * @returns { Promise<void> } The promise returned by the function.
2686   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2687   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2688   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2689   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2690   * @throws { BusinessError } 16000002 - Incorrect ability type.
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 } 16200001 - The caller has been released.
2697   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2698   * @systemapi
2699   * @stagemodelonly
2700   * @since 9
2701   */
2702  /**
2703   * Starts a new service extension ability.
2704   * If the target service extension ability is visible, you can start the target service extension ability;
2705   * If the target service extension ability is invisible,
2706   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2707   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2708   *
2709   * @param { Want } want - Indicates the want info to start.
2710   * @returns { Promise<void> } The promise returned by the function.
2711   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2712   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2713   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2714   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2715   * @throws { BusinessError } 16000002 - Incorrect ability type.
2716   * @throws { BusinessError } 16000004 - Can not start invisible component.
2717   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2718   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2719   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2720   * @throws { BusinessError } 16000011 - The context does not exist.
2721   * @throws { BusinessError } 16000012 - The application is controlled.
2722   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2723   * @throws { BusinessError } 16000050 - Internal error.
2724   * @throws { BusinessError } 16200001 - The caller has been released.
2725   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2726   * @systemapi
2727   * @stagemodelonly
2728   * @since 10
2729   */
2730  /**
2731   * Starts a new service extension ability.
2732   * If the target service extension ability is visible, you can start the target service extension ability;
2733   * If the target service extension ability is invisible,
2734   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2735   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2736   *
2737   * @param { Want } want - Indicates the want info to start.
2738   * @returns { Promise<void> } The promise returned by the function.
2739   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2740   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2741   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2742   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2743   * @throws { BusinessError } 16000002 - Incorrect ability type.
2744   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
2745   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2746   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2747   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2748   * @throws { BusinessError } 16000011 - The context does not exist.
2749   * @throws { BusinessError } 16000012 - The application is controlled.
2750   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2751   * @throws { BusinessError } 16000019 - No matching ability is found.
2752   * @throws { BusinessError } 16000050 - Internal error.
2753   * @throws { BusinessError } 16200001 - The caller has been released.
2754   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2755   * @systemapi
2756   * @stagemodelonly
2757   * @since 12
2758   */
2759  startServiceExtensionAbility(want: Want): Promise<void>;
2760
2761  /**
2762   * Starts a new service extension ability with account.
2763   *
2764   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2765   * @param { Want } want - Indicates the want info to start.
2766   * @param { number } accountId - Indicates the account to start.
2767   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
2768   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2769   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2770   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2771   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2772   * @throws { BusinessError } 16000002 - Incorrect ability type.
2773   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2774   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2775   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2776   * @throws { BusinessError } 16000011 - The context does not exist.
2777   * @throws { BusinessError } 16000050 - Internal error.
2778   * @throws { BusinessError } 16200001 - The caller has been released.
2779   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2780   * @systemapi
2781   * @stagemodelonly
2782   * @since 9
2783   */
2784  /**
2785   * Starts a new service extension ability with account.
2786   * If the target service extension ability is visible, you can start the target service extension ability;
2787   * If the target service extension ability is invisible,
2788   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2789   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2790   *
2791   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2792   * @param { Want } want - Indicates the want info to start.
2793   * @param { number } accountId - Indicates the account to start.
2794   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
2795   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2796   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2797   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2798   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2799   * @throws { BusinessError } 16000002 - Incorrect ability type.
2800   * @throws { BusinessError } 16000004 - Can not start invisible component.
2801   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2802   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2803   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2804   * @throws { BusinessError } 16000011 - The context does not exist.
2805   * @throws { BusinessError } 16000012 - The application is controlled.
2806   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2807   * @throws { BusinessError } 16000050 - Internal error.
2808   * @throws { BusinessError } 16200001 - The caller has been released.
2809   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2810   * @systemapi
2811   * @stagemodelonly
2812   * @since 10
2813   */
2814  /**
2815   * Starts a new service extension ability with account.
2816   * If the target service extension ability is visible, you can start the target service extension ability;
2817   * If the target service extension ability is invisible,
2818   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2819   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2820   *
2821   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2822   * @param { Want } want - Indicates the want info to start.
2823   * @param { number } accountId - Indicates the account to start.
2824   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
2825   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2826   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2827   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2828   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2829   * @throws { BusinessError } 16000002 - Incorrect ability type.
2830   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
2831   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2832   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2833   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2834   * @throws { BusinessError } 16000011 - The context does not exist.
2835   * @throws { BusinessError } 16000012 - The application is controlled.
2836   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2837   * @throws { BusinessError } 16000019 - No matching ability is found.
2838   * @throws { BusinessError } 16000050 - Internal error.
2839   * @throws { BusinessError } 16200001 - The caller has been released.
2840   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2841   * @systemapi
2842   * @stagemodelonly
2843   * @since 12
2844   */
2845  startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
2846
2847  /**
2848   * Starts a new service extension ability with account.
2849   *
2850   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2851   * @param { Want } want - Indicates the want info to start.
2852   * @param { number } accountId - Indicates the account to start.
2853   * @returns { Promise<void> } The promise returned by the function.
2854   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2855   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2856   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2857   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2858   * @throws { BusinessError } 16000002 - Incorrect ability type.
2859   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2860   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2861   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2862   * @throws { BusinessError } 16000011 - The context does not exist.
2863   * @throws { BusinessError } 16000050 - Internal error.
2864   * @throws { BusinessError } 16200001 - The caller has been released.
2865   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2866   * @systemapi
2867   * @stagemodelonly
2868   * @since 9
2869   */
2870  /**
2871   * Starts a new service extension ability with account.
2872   * If the target service extension ability is visible, you can start the target service extension ability;
2873   * If the target service extension ability is invisible,
2874   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2875   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2876   *
2877   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2878   * @param { Want } want - Indicates the want info to start.
2879   * @param { number } accountId - Indicates the account to start.
2880   * @returns { Promise<void> } The promise returned by the function.
2881   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2882   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2883   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2884   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2885   * @throws { BusinessError } 16000002 - Incorrect ability type.
2886   * @throws { BusinessError } 16000004 - Can not start invisible component.
2887   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2888   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2889   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2890   * @throws { BusinessError } 16000011 - The context does not exist.
2891   * @throws { BusinessError } 16000012 - The application is controlled.
2892   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2893   * @throws { BusinessError } 16000050 - Internal error.
2894   * @throws { BusinessError } 16200001 - The caller has been released.
2895   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2896   * @systemapi
2897   * @stagemodelonly
2898   * @since 10
2899   */
2900  /**
2901   * Starts a new service extension ability with account.
2902   * If the target service extension ability is visible, you can start the target service extension ability;
2903   * If the target service extension ability is invisible,
2904   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
2905   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2906   *
2907   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
2908   * @param { Want } want - Indicates the want info to start.
2909   * @param { number } accountId - Indicates the account to start.
2910   * @returns { Promise<void> } The promise returned by the function.
2911   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2912   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2913   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2914   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2915   * @throws { BusinessError } 16000002 - Incorrect ability type.
2916   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
2917   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2918   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2919   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
2920   * @throws { BusinessError } 16000011 - The context does not exist.
2921   * @throws { BusinessError } 16000012 - The application is controlled.
2922   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2923   * @throws { BusinessError } 16000019 - No matching ability is found.
2924   * @throws { BusinessError } 16000050 - Internal error.
2925   * @throws { BusinessError } 16200001 - The caller has been released.
2926   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2927   * @systemapi
2928   * @stagemodelonly
2929   * @since 12
2930   */
2931  startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>;
2932
2933  /**
2934   * Stops other service extension ability.
2935   *
2936   * @param { Want } want - Indicates the want info to start.
2937   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbility.
2938   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2939   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2940   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2941   * @throws { BusinessError } 16000002 - Incorrect ability type.
2942   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2943   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2944   * @throws { BusinessError } 16000011 - The context does not exist.
2945   * @throws { BusinessError } 16000050 - Internal error.
2946   * @throws { BusinessError } 16200001 - The caller has been released.
2947   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2948   * @systemapi
2949   * @stagemodelonly
2950   * @since 9
2951   */
2952  /**
2953   * Stops other service extension ability.
2954   * If the target service extension ability is visible, you can stop the target service extension ability;
2955   * If the target service extension ability is invisible,
2956   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
2957   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
2958   *
2959   * @param { Want } want - Indicates the want info to start.
2960   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbility.
2961   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
2962   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2963   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2964   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2965   * @throws { BusinessError } 16000002 - Incorrect ability type.
2966   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
2967   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2968   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2969   * @throws { BusinessError } 16000011 - The context does not exist.
2970   * @throws { BusinessError } 16000012 - The application is controlled.
2971   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
2972   * @throws { BusinessError } 16000050 - Internal error.
2973   * @throws { BusinessError } 16200001 - The caller has been released.
2974   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2975   * @systemapi
2976   * @stagemodelonly
2977   * @since 10
2978   */
2979  stopServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void;
2980
2981  /**
2982   * Stops other service extension ability.
2983   *
2984   * @param { Want } want - Indicates the want info to start.
2985   * @returns { Promise<void> } The promise returned by the function.
2986   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
2987   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
2988   * @throws { BusinessError } 16000001 - The specified ability does not exist.
2989   * @throws { BusinessError } 16000002 - Incorrect ability type.
2990   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
2991   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
2992   * @throws { BusinessError } 16000011 - The context does not exist.
2993   * @throws { BusinessError } 16000050 - Internal error.
2994   * @throws { BusinessError } 16200001 - The caller has been released.
2995   * @syscap SystemCapability.Ability.AbilityRuntime.Core
2996   * @systemapi
2997   * @stagemodelonly
2998   * @since 9
2999   */
3000  /**
3001   * Stops other service extension ability.
3002   * If the target service extension ability is visible, you can stop the target service extension ability;
3003   * If the target service extension ability is invisible,
3004   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
3005   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3006   *
3007   * @param { Want } want - Indicates the want info to start.
3008   * @returns { Promise<void> } The promise returned by the function.
3009   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3010   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3011   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3012   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3013   * @throws { BusinessError } 16000002 - Incorrect ability type.
3014   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
3015   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3016   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3017   * @throws { BusinessError } 16000011 - The context does not exist.
3018   * @throws { BusinessError } 16000050 - Internal error.
3019   * @throws { BusinessError } 16200001 - The caller has been released.
3020   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3021   * @systemapi
3022   * @stagemodelonly
3023   * @since 10
3024   */
3025  stopServiceExtensionAbility(want: Want): Promise<void>;
3026
3027  /**
3028   * Stops other service extension ability with account.
3029   *
3030   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
3031   * @param { Want } want - Indicates the want info to start.
3032   * @param { number } accountId - Indicates the accountId to start.
3033   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbilityWithAccount.
3034   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3035   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3036   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3037   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3038   * @throws { BusinessError } 16000002 - Incorrect ability type.
3039   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3040   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3041   * @throws { BusinessError } 16000011 - The context does not exist.
3042   * @throws { BusinessError } 16000050 - Internal error.
3043   * @throws { BusinessError } 16200001 - The caller has been released.
3044   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3045   * @systemapi
3046   * @stagemodelonly
3047   * @since 9
3048   */
3049  /**
3050   * Stops other service extension ability with account.
3051   * If the target service extension ability is visible, you can stop the target service extension ability;
3052   * If the target service extension ability is invisible,
3053   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
3054   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3055   *
3056   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
3057   * @param { Want } want - Indicates the want info to start.
3058   * @param { number } accountId - Indicates the accountId to start.
3059   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbilityWithAccount.
3060   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3061   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3062   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3063   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3064   * @throws { BusinessError } 16000002 - Incorrect ability type.
3065   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
3066   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3067   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3068   * @throws { BusinessError } 16000011 - The context does not exist.
3069   * @throws { BusinessError } 16000050 - Internal error.
3070   * @throws { BusinessError } 16200001 - The caller has been released.
3071   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3072   * @systemapi
3073   * @stagemodelonly
3074   * @since 10
3075   */
3076  stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
3077
3078  /**
3079   * Stops other service extension ability with account.
3080   *
3081   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
3082   * @param { Want } want - Indicates the want info to start.
3083   * @param { number } accountId - Indicates the accountId to start.
3084   * @returns { Promise<void> } The promise returned by the function.
3085   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3086   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3087   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3088   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3089   * @throws { BusinessError } 16000002 - Incorrect ability type.
3090   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3091   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3092   * @throws { BusinessError } 16000011 - The context does not exist.
3093   * @throws { BusinessError } 16000050 - Internal error.
3094   * @throws { BusinessError } 16200001 - The caller has been released.
3095   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3096   * @systemapi
3097   * @stagemodelonly
3098   * @since 9
3099   */
3100  /**
3101   * Stops other service extension ability with account.
3102   * If the target service extension ability is visible, you can stop the target service extension ability;
3103   * If the target service extension ability is invisible,
3104   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
3105   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3106   *
3107   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
3108   * @param { Want } want - Indicates the want info to start.
3109   * @param { number } accountId - Indicates the accountId to start.
3110   * @returns { Promise<void> } The promise returned by the function.
3111   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3112   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3113   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3114   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3115   * @throws { BusinessError } 16000002 - Incorrect ability type.
3116   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
3117   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3118   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3119   * @throws { BusinessError } 16000011 - The context does not exist.
3120   * @throws { BusinessError } 16000050 - Internal error.
3121   * @throws { BusinessError } 16200001 - The caller has been released.
3122   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3123   * @systemapi
3124   * @stagemodelonly
3125   * @since 10
3126   */
3127  stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>;
3128
3129  /**
3130   * Destroys this Page ability.
3131   *
3132   * @param { AsyncCallback<void> } callback - The callback of terminateSelf.
3133   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3134   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3135   * @throws { BusinessError } 16000004 - Can not start invisible component.
3136   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3137   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3138   * @throws { BusinessError } 16000011 - The context does not exist.
3139   * @throws { BusinessError } 16000050 - Internal error.
3140   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3141   * @stagemodelonly
3142   * @since 9
3143   */
3144  /**
3145   * Destroys this Page ability.
3146   *
3147   * @param { AsyncCallback<void> } callback - The callback of terminateSelf.
3148   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3149   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3150   * @throws { BusinessError } 16000011 - The context does not exist.
3151   * @throws { BusinessError } 16000050 - Internal error.
3152   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3153   * @stagemodelonly
3154   * @crossplatform
3155   * @since 10
3156   */
3157  /**
3158   * Destroys this Page ability.
3159   *
3160   * @param { AsyncCallback<void> } callback - The callback of terminateSelf.
3161   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3162   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3163   * @throws { BusinessError } 16000011 - The context does not exist.
3164   * @throws { BusinessError } 16000050 - Internal error.
3165   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3166   * @stagemodelonly
3167   * @crossplatform
3168   * @atomicservice
3169   * @since 11
3170   */
3171  terminateSelf(callback: AsyncCallback<void>): void;
3172
3173  /**
3174   * Destroys this Page ability.
3175   *
3176   * @returns { Promise<void> } The promise returned by the function.
3177   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3178   * @throws { BusinessError } 16000004 - Can not start invisible component.
3179   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3180   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3181   * @throws { BusinessError } 16000011 - The context does not exist.
3182   * @throws { BusinessError } 16000050 - Internal error.
3183   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3184   * @stagemodelonly
3185   * @since 9
3186   */
3187  /**
3188   * Destroys this Page ability.
3189   *
3190   * @returns { Promise<void> } The promise returned by the function.
3191   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3192   * @throws { BusinessError } 16000011 - The context does not exist.
3193   * @throws { BusinessError } 16000050 - Internal error.
3194   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3195   * @stagemodelonly
3196   * @crossplatform
3197   * @since 10
3198   */
3199  /**
3200   * Destroys this Page ability.
3201   *
3202   * @returns { Promise<void> } The promise returned by the function.
3203   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3204   * @throws { BusinessError } 16000011 - The context does not exist.
3205   * @throws { BusinessError } 16000050 - Internal error.
3206   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3207   * @stagemodelonly
3208   * @crossplatform
3209   * @atomicservice
3210   * @since 11
3211   */
3212  terminateSelf(): Promise<void>;
3213
3214  /**
3215   * Destroys the Page ability while returning the specified result code and data to the caller.
3216   *
3217   * @param { AbilityResult } parameter - Indicates the result to return.
3218   * @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
3219   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3220   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3221   * @throws { BusinessError } 16000004 - Can not start invisible component.
3222   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3223   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3224   * @throws { BusinessError } 16000011 - The context does not exist.
3225   * @throws { BusinessError } 16000050 - Internal error.
3226   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3227   * @stagemodelonly
3228   * @since 9
3229   */
3230  /**
3231   * Destroys the Page ability while returning the specified result code and data to the caller.
3232   *
3233   * @param { AbilityResult } parameter - Indicates the result to return.
3234   * @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
3235   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3236   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3237   * @throws { BusinessError } 16000011 - The context does not exist.
3238   * @throws { BusinessError } 16000050 - Internal error.
3239   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3240   * @stagemodelonly
3241   * @since 10
3242   */
3243  /**
3244   * Destroys the Page ability while returning the specified result code and data to the caller.
3245   *
3246   * @param { AbilityResult } parameter - Indicates the result to return.
3247   * @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
3248   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3249   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3250   * @throws { BusinessError } 16000011 - The context does not exist.
3251   * @throws { BusinessError } 16000050 - Internal error.
3252   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3253   * @stagemodelonly
3254   * @atomicservice
3255   * @since 11
3256   */
3257  terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void;
3258
3259  /**
3260   * Destroys the Page ability while returning the specified result code and data to the caller.
3261   *
3262   * @param { AbilityResult } parameter - Indicates the result to return.
3263   * @returns { Promise<void> } The promise returned by the function.
3264   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3265   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3266   * @throws { BusinessError } 16000004 - Can not start invisible component.
3267   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3268   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3269   * @throws { BusinessError } 16000011 - The context does not exist.
3270   * @throws { BusinessError } 16000050 - Internal error.
3271   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3272   * @stagemodelonly
3273   * @since 9
3274   */
3275  /**
3276   * Destroys the Page ability while returning the specified result code and data to the caller.
3277   *
3278   * @param { AbilityResult } parameter - Indicates the result to return.
3279   * @returns { Promise<void> } The promise returned by the function.
3280   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3281   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3282   * @throws { BusinessError } 16000011 - The context does not exist.
3283   * @throws { BusinessError } 16000050 - Internal error.
3284   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3285   * @stagemodelonly
3286   * @since 10
3287   */
3288  /**
3289   * Destroys the Page ability while returning the specified result code and data to the caller.
3290   *
3291   * @param { AbilityResult } parameter - Indicates the result to return.
3292   * @returns { Promise<void> } The promise returned by the function.
3293   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3294   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3295   * @throws { BusinessError } 16000011 - The context does not exist.
3296   * @throws { BusinessError } 16000050 - Internal error.
3297   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3298   * @stagemodelonly
3299   * @atomicservice
3300   * @since 11
3301   */
3302  terminateSelfWithResult(parameter: AbilityResult): Promise<void>;
3303
3304  /**
3305   * Return to caller application with specified result code and data while not destroying current ability.
3306   * If the current application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3307   *
3308   * @param { AbilityResult } abilityResult - Indicates the result to return.
3309   * @param { string } requestCode - Indicates the request code of caller ability.
3310   * @returns { Promise<void> } The promise returned by the function.
3311   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3312   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3313   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3314   * @throws { BusinessError } 16000011 - The context does not exist.
3315   * @throws { BusinessError } 16000050 - Internal error.
3316   * @throws { BusinessError } 16000074 - The caller does not exist.
3317   * @throws { BusinessError } 16000075 - Not support back to caller.
3318   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3319   * @stagemodelonly
3320   * @atomicservice
3321   * @since 12
3322   */
3323  backToCallerAbilityWithResult(abilityResult: AbilityResult, requestCode: string): Promise<void>;
3324
3325  /**
3326   * Connects the current ability to an service extension ability.
3327   *
3328   * @param { Want } want - The element name of the service ability
3329   * @param { ConnectOptions } options - The remote object instance
3330   * @returns { number } Returns the number code of the ability connected
3331   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3332   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3333   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3334   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3335   * @throws { BusinessError } 16000011 - The context does not exist.
3336   * @throws { BusinessError } 16000050 - Internal error.
3337   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3338   * @stagemodelonly
3339   * @since 9
3340   */
3341  /**
3342   * Connects the current ability to an service extension ability.
3343   * If the target service extension ability is visible, you can connect the target service extension ability;
3344   * If the target service extension ability is invisible,
3345   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible service extension ability.
3346   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3347   *
3348   * @param { Want } want - The element name of the service ability
3349   * @param { ConnectOptions } options - The remote object instance
3350   * @returns { number } Returns the number code of the ability connected
3351   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3352   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3353   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3354   * @throws { BusinessError } 16000002 - Incorrect ability type.
3355   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
3356   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3357   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3358   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3359   * @throws { BusinessError } 16000011 - The context does not exist.
3360   * @throws { BusinessError } 16000050 - Internal error.
3361   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3362   * @throws { BusinessError } 16000055 - Installation-free timed out.
3363   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3364   * @stagemodelonly
3365   * @since 10
3366   */
3367  connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
3368
3369  /**
3370   * Connects the current ability to an service extension ability with account.
3371   *
3372   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
3373   * @param { Want } want - The element name of the service ability
3374   * @param { number } accountId - The account to connect
3375   * @param { ConnectOptions } options - The remote object instance
3376   * @returns { number } Returns the number code of the ability connected
3377   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3378   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3379   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3380   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3381   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3382   * @throws { BusinessError } 16000011 - The context does not exist.
3383   * @throws { BusinessError } 16000050 - Internal error.
3384   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3385   * @systemapi
3386   * @stagemodelonly
3387   * @since 9
3388   */
3389  /**
3390   * Connects the current ability to an service extension ability with account.
3391   * If the target service extension ability is visible, you can connect the target service extension ability;
3392   * If the target service extension ability is invisible,
3393   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible service extension ability.
3394   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3395   *
3396   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
3397   * @param { Want } want - The element name of the service ability
3398   * @param { number } accountId - The account to connect
3399   * @param { ConnectOptions } options - The remote object instance
3400   * @returns { number } Returns the number code of the ability connected
3401   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3402   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3403   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3404   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3405   * @throws { BusinessError } 16000002 - Incorrect ability type.
3406   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
3407   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3408   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3409   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3410   * @throws { BusinessError } 16000011 - The context does not exist.
3411   * @throws { BusinessError } 16000050 - Internal error.
3412   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3413   * @throws { BusinessError } 16000055 - Installation-free timed out.
3414   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3415   * @systemapi
3416   * @stagemodelonly
3417   * @since 10
3418   */
3419  connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number;
3420
3421  /**
3422   * Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
3423   *
3424   * @param { number } connection - The number code of the ability connected
3425   * @param { AsyncCallback<void> } callback - The callback of disconnectAbility.
3426   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3427   * @throws { BusinessError } 16000011 - The context does not exist.
3428   * @throws { BusinessError } 16000050 - Internal error.
3429   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3430   * @stagemodelonly
3431   * @since 9
3432   */
3433  disconnectServiceExtensionAbility(connection: number, callback: AsyncCallback<void>): void;
3434
3435  /**
3436   * Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
3437   *
3438   * @param { number } connection - The number code of the ability connected
3439   * @returns { Promise<void> } The promise returned by the function.
3440   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3441   * @throws { BusinessError } 16000011 - The context does not exist.
3442   * @throws { BusinessError } 16000050 - Internal error.
3443   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3444   * @stagemodelonly
3445   * @since 9
3446   */
3447  disconnectServiceExtensionAbility(connection: number): Promise<void>;
3448
3449  /**
3450   * Set mission label of current ability.
3451   *
3452   * @param { string } label - The label of ability that showed in recent missions.
3453   * @param { AsyncCallback<void> } callback - The callback of setMissionLabel.
3454   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3455   * @throws { BusinessError } 16000011 - The context does not exist.
3456   * @throws { BusinessError } 16000050 - Internal error.
3457   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3458   * @stagemodelonly
3459   * @since 9
3460   */
3461  /**
3462   * Set mission label of current ability.
3463   *
3464   * @param { string } label - The label of ability that showed in recent missions.
3465   * @param { AsyncCallback<void> } callback - The callback of setMissionLabel.
3466   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3467   * @throws { BusinessError } 16000011 - The context does not exist.
3468   * @throws { BusinessError } 16000050 - Internal error.
3469   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3470   * @stagemodelonly
3471   * @atomicservice
3472   * @since 11
3473   */
3474  setMissionLabel(label: string, callback: AsyncCallback<void>): void;
3475
3476  /**
3477   * Set mission label of current ability.
3478   *
3479   * @param { string } label - The label of ability that showed in recent missions.
3480   * @returns { Promise<void> } The promise returned by the function.
3481   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3482   * @throws { BusinessError } 16000011 - The context does not exist.
3483   * @throws { BusinessError } 16000050 - Internal error.
3484   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3485   * @stagemodelonly
3486   * @since 9
3487   */
3488  /**
3489   * Set mission label of current ability.
3490   *
3491   * @param { string } label - The label of ability that showed in recent missions.
3492   * @returns { Promise<void> } The promise returned by the function.
3493   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3494   * @throws { BusinessError } 16000011 - The context does not exist.
3495   * @throws { BusinessError } 16000050 - Internal error.
3496   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3497   * @stagemodelonly
3498   * @atomicservice
3499   * @since 11
3500   */
3501  setMissionLabel(label: string): Promise<void>;
3502
3503  /**
3504   * Set mission icon of current ability.
3505   *
3506   * @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
3507   * @param { AsyncCallback<void> } callback - The callback of setMissionIcon.
3508   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3509   * @throws { BusinessError } 16000011 - The context does not exist.
3510   * @throws { BusinessError } 16000050 - Internal error.
3511   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3512   * @systemapi
3513   * @stagemodelonly
3514   * @since 9
3515   */
3516  /**
3517   * Set mission icon of current ability.
3518   *
3519   * @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
3520   * @param { AsyncCallback<void> } callback - The callback of setMissionIcon.
3521   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3522   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3523   * @throws { BusinessError } 16000011 - The context does not exist.
3524   * @throws { BusinessError } 16000050 - Internal error.
3525   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3526   * @systemapi
3527   * @stagemodelonly
3528   * @since 10
3529   */
3530  setMissionIcon(icon: image.PixelMap, callback: AsyncCallback<void>): void;
3531
3532  /**
3533   * Set mission icon of current ability.
3534   *
3535   * @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
3536   * @returns { Promise<void> } The promise returned by the function.
3537   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3538   * @throws { BusinessError } 16000011 - The context does not exist.
3539   * @throws { BusinessError } 16000050 - Internal error.
3540   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3541   * @systemapi
3542   * @stagemodelonly
3543   * @since 9
3544   */
3545  /**
3546   * Set mission icon of current ability.
3547   *
3548   * @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
3549   * @returns { Promise<void> } The promise returned by the function.
3550   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
3551   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3552   * @throws { BusinessError } 16000011 - The context does not exist.
3553   * @throws { BusinessError } 16000050 - Internal error.
3554   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3555   * @systemapi
3556   * @stagemodelonly
3557   * @since 10
3558   */
3559  setMissionIcon(icon: image.PixelMap): Promise<void>;
3560
3561  /**
3562   * Set mission continue state of current ability.
3563   *
3564   * @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
3565   * @param { AsyncCallback<void> } callback - The callback of setMissionContinueState.
3566   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3567   * @throws { BusinessError } 16000011 - The context does not exist.
3568   * @throws { BusinessError } 16000050 - Internal error.
3569   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3570   * @stagemodelonly
3571   * @since 10
3572   */
3573  /**
3574   * Set mission continue state of current ability.
3575   *
3576   * @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
3577   * @param { AsyncCallback<void> } callback - The callback of setMissionContinueState.
3578   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3579   * @throws { BusinessError } 16000011 - The context does not exist.
3580   * @throws { BusinessError } 16000050 - Internal error.
3581   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3582   * @stagemodelonly
3583   * @atomicservice
3584   * @since 11
3585   */
3586  setMissionContinueState(state: AbilityConstant.ContinueState, callback: AsyncCallback<void>): void;
3587
3588  /**
3589   * Set mission continue state of current ability.
3590   *
3591   * @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
3592   * @returns { Promise<void> } The promise returned by the function.
3593   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3594   * @throws { BusinessError } 16000011 - The context does not exist.
3595   * @throws { BusinessError } 16000050 - Internal error.
3596   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3597   * @stagemodelonly
3598   * @since 10
3599   */
3600  /**
3601   * Set mission continue state of current ability.
3602   *
3603   * @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
3604   * @returns { Promise<void> } The promise returned by the function.
3605   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3606   * @throws { BusinessError } 16000011 - The context does not exist.
3607   * @throws { BusinessError } 16000050 - Internal error.
3608   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3609   * @stagemodelonly
3610   * @atomicservice
3611   * @since 11
3612   */
3613  setMissionContinueState(state: AbilityConstant.ContinueState): Promise<void>;
3614
3615  /**
3616   * Restore window stage data in ability continuation
3617   *
3618   * @param { LocalStorage } localStorage - the storage data used to restore window stage
3619   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3620   * @throws { BusinessError } 16000011 - The context does not exist.
3621   * @throws { BusinessError } 16000050 - Internal error.
3622   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3623   * @stagemodelonly
3624   * @since 9
3625   */
3626  /**
3627   * Restore window stage data in ability continuation
3628   *
3629   * @param { LocalStorage } localStorage - the storage data used to restore window stage
3630   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
3631   * @throws { BusinessError } 16000011 - The context does not exist.
3632   * @throws { BusinessError } 16000050 - Internal error.
3633   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3634   * @stagemodelonly
3635   * @atomicservice
3636   * @since 11
3637   */
3638  restoreWindowStage(localStorage: LocalStorage): void;
3639
3640  /**
3641   * Check to see ability is in terminating state.
3642   *
3643   * @returns { boolean } Returns true when ability is in terminating state, else returns false.
3644   * @throws { BusinessError } 16000011 - The context does not exist.
3645   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3646   * @stagemodelonly
3647   * @since 9
3648   */
3649  /**
3650   * Check to see ability is in terminating state.
3651   *
3652   * @returns { boolean } Returns true when ability is in terminating state, else returns false.
3653   * @throws { BusinessError } 16000011 - The context does not exist.
3654   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3655   * @stagemodelonly
3656   * @atomicservice
3657   * @since 11
3658   */
3659  isTerminating(): boolean;
3660
3661  /**
3662   * Service extension uses this method to start a specific ability,
3663   * if ability is multi instance, will start a recent instance.
3664   *
3665   * @param { Want } want - Indicates the ability to start.
3666   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3667   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3668   * 2. Incorrect parameter types; 3. Parameter verification failed.
3669   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3670   * @throws { BusinessError } 16000002 - Incorrect ability type.
3671   * @throws { BusinessError } 16000004 - Can not start invisible component.
3672   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3673   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3674   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3675   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3676   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3677   * @throws { BusinessError } 16000011 - The context does not exist.
3678   * @throws { BusinessError } 16000050 - Internal error.
3679   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3680   * @throws { BusinessError } 16000055 - Installation-free timed out.
3681   * @throws { BusinessError } 16200001 - The caller has been released.
3682   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3683   * @systemapi
3684   * @stagemodelonly
3685   * @since 9
3686   */
3687  /**
3688   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3689   * you can use this method to start ability; If the caller application is in the background,
3690   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3691   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3692   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3693   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3694   *
3695   * @param { Want } want - Indicates the ability to start.
3696   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3697   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3698   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3699   * 2. Incorrect parameter types; 3. Parameter verification failed.
3700   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3701   * @throws { BusinessError } 16000002 - Incorrect ability type.
3702   * @throws { BusinessError } 16000004 - Can not start invisible component.
3703   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3704   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3705   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3706   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3707   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3708   * @throws { BusinessError } 16000011 - The context does not exist.
3709   * @throws { BusinessError } 16000012 - The application is controlled.
3710   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3711   * @throws { BusinessError } 16000050 - Internal error.
3712   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3713   * @throws { BusinessError } 16000055 - Installation-free timed out.
3714   * @throws { BusinessError } 16200001 - The caller has been released.
3715   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3716   * @systemapi
3717   * @stagemodelonly
3718   * @since 10
3719   */
3720  /**
3721   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3722   * you can use this method to start ability; If the caller application is in the background,
3723   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3724   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3725   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3726   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3727   *
3728   * @param { Want } want - Indicates the ability to start.
3729   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3730   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3731   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3732   * 2. Incorrect parameter types; 3. Parameter verification failed.
3733   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3734   * @throws { BusinessError } 16000002 - Incorrect ability type.
3735   * @throws { BusinessError } 16000004 - Can not start invisible component.
3736   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3737   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3738   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3739   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3740   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
3741   * @throws { BusinessError } 16000011 - The context does not exist.
3742   * @throws { BusinessError } 16000012 - The application is controlled.
3743   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3744   * @throws { BusinessError } 16000050 - Internal error.
3745   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3746   * @throws { BusinessError } 16000055 - Installation-free timed out.
3747   * @throws { BusinessError } 16200001 - The caller has been released.
3748   * @throws { BusinessError } 16000073 - The app clone index is invalid.
3749   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3750   * @systemapi
3751   * @stagemodelonly
3752   * @since 12
3753   */
3754  /**
3755   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3756   * you can use this method to start ability; If the caller application is in the background,
3757   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3758   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3759   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3760   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3761   *
3762   * @param { Want } want - Indicates the ability to start.
3763   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3764   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3765   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3766   * 2. Incorrect parameter types; 3. Parameter verification failed.
3767   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3768   * @throws { BusinessError } 16000002 - Incorrect ability type.
3769   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
3770   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3771   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3772   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3773   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3774   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
3775   * @throws { BusinessError } 16000011 - The context does not exist.
3776   * @throws { BusinessError } 16000012 - The application is controlled.
3777   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3778   * @throws { BusinessError } 16000050 - Internal error.
3779   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3780   * @throws { BusinessError } 16000055 - Installation-free timed out.
3781   * @throws { BusinessError } 16000071 - App clone is not supported.
3782   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
3783   * @throws { BusinessError } 16000073 - The app clone index is invalid.
3784   * @throws { BusinessError } 16000076 - The app instance key is invalid.
3785   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
3786   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
3787   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
3788   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
3789   * @throws { BusinessError } 16200001 - The caller has been released.
3790   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3791   * @systemapi
3792   * @stagemodelonly
3793   * @since 14
3794   */
3795  startRecentAbility(want: Want, callback: AsyncCallback<void>): void;
3796
3797  /**
3798   * Service extension uses this method to start a specific ability,
3799   * if ability is multi instance, will start a recent instance.
3800   *
3801   * @param { Want } want - Indicates the ability to start.
3802   * @param { StartOptions } options - Indicates the start options.
3803   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3804   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3805   * 2. Incorrect parameter types; 3. Parameter verification failed.
3806   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3807   * @throws { BusinessError } 16000002 - Incorrect ability type.
3808   * @throws { BusinessError } 16000004 - Can not start invisible component.
3809   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3810   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3811   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3812   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3813   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3814   * @throws { BusinessError } 16000011 - The context does not exist.
3815   * @throws { BusinessError } 16000050 - Internal error.
3816   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3817   * @throws { BusinessError } 16000055 - Installation-free timed out.
3818   * @throws { BusinessError } 16200001 - The caller has been released.
3819   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3820   * @systemapi
3821   * @stagemodelonly
3822   * @since 9
3823   */
3824  /**
3825   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3826   * you can use this method to start ability; If the caller application is in the background,
3827   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3828   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3829   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3830   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3831   *
3832   * @param { Want } want - Indicates the ability to start.
3833   * @param { StartOptions } options - Indicates the start options.
3834   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3835   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3836   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3837   * 2. Incorrect parameter types; 3. Parameter verification failed.
3838   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3839   * @throws { BusinessError } 16000004 - Can not start invisible component.
3840   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3841   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3842   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3843   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3844   * @throws { BusinessError } 16000011 - The context does not exist.
3845   * @throws { BusinessError } 16000012 - The application is controlled.
3846   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3847   * @throws { BusinessError } 16000050 - Internal error.
3848   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3849   * @throws { BusinessError } 16000055 - Installation-free timed out.
3850   * @throws { BusinessError } 16200001 - The caller has been released.
3851   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3852   * @systemapi
3853   * @stagemodelonly
3854   * @since 10
3855   */
3856  /**
3857   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3858   * you can use this method to start ability; If the caller application is in the background,
3859   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3860   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3861   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3862   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3863   *
3864   * @param { Want } want - Indicates the ability to start.
3865   * @param { StartOptions } options - Indicates the start options.
3866   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3867   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3868   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3869   * 2. Incorrect parameter types; 3. Parameter verification failed.
3870   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3871   * @throws { BusinessError } 16000004 - Can not start invisible component.
3872   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3873   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3874   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3875   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3876   * @throws { BusinessError } 16000011 - The context does not exist.
3877   * @throws { BusinessError } 16000012 - The application is controlled.
3878   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3879   * @throws { BusinessError } 16000050 - Internal error.
3880   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3881   * @throws { BusinessError } 16000055 - Installation-free timed out.
3882   * @throws { BusinessError } 16200001 - The caller has been released.
3883   * @throws { BusinessError } 16000073 - The app clone index is invalid.
3884   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3885   * @systemapi
3886   * @stagemodelonly
3887   * @since 12
3888   */
3889  /**
3890   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3891   * you can use this method to start ability; If the caller application is in the background,
3892   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3893   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3894   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3895   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3896   *
3897   * @param { Want } want - Indicates the ability to start.
3898   * @param { StartOptions } options - Indicates the start options.
3899   * @param { AsyncCallback<void> } callback - The callback of startAbility.
3900   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3901   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3902   * 2. Incorrect parameter types; 3. Parameter verification failed.
3903   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3904   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
3905   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3906   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3907   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3908   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3909   * @throws { BusinessError } 16000011 - The context does not exist.
3910   * @throws { BusinessError } 16000012 - The application is controlled.
3911   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3912   * @throws { BusinessError } 16000050 - Internal error.
3913   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3914   * @throws { BusinessError } 16000055 - Installation-free timed out.
3915   * @throws { BusinessError } 16000071 - App clone is not supported.
3916   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
3917   * @throws { BusinessError } 16000073 - The app clone index is invalid.
3918   * @throws { BusinessError } 16000076 - The app instance key is invalid.
3919   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
3920   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
3921   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
3922   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
3923   * @throws { BusinessError } 16200001 - The caller has been released.
3924   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3925   * @systemapi
3926   * @stagemodelonly
3927   * @since 14
3928   */
3929  startRecentAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
3930
3931  /**
3932   * Service extension uses this method to start a specific ability,
3933   * if ability is multi instance, will start a recent instance.
3934   *
3935   * @param { Want } want - Indicates the ability to start.
3936   * @param { StartOptions } [options] - Indicates the start options.
3937   * @returns { Promise<void> } The promise returned by the function.
3938   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3939   * 2. Incorrect parameter types; 3. Parameter verification failed.
3940   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3941   * @throws { BusinessError } 16000002 - Incorrect ability type.
3942   * @throws { BusinessError } 16000004 - Can not start invisible component.
3943   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3944   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3945   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3946   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3947   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3948   * @throws { BusinessError } 16000011 - The context does not exist.
3949   * @throws { BusinessError } 16000050 - Internal error.
3950   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3951   * @throws { BusinessError } 16000055 - Installation-free timed out.
3952   * @throws { BusinessError } 16200001 - The caller has been released.
3953   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3954   * @systemapi
3955   * @stagemodelonly
3956   * @since 9
3957   */
3958  /**
3959   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3960   * you can use this method to start ability; If the caller application is in the background,
3961   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3962   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3963   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3964   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3965   *
3966   * @param { Want } want - Indicates the ability to start.
3967   * @param { StartOptions } [options] - Indicates the start options.
3968   * @returns { Promise<void> } The promise returned by the function.
3969   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
3970   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
3971   * 2. Incorrect parameter types; 3. Parameter verification failed.
3972   * @throws { BusinessError } 16000001 - The specified ability does not exist.
3973   * @throws { BusinessError } 16000002 - Incorrect ability type.
3974   * @throws { BusinessError } 16000004 - Can not start invisible component.
3975   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
3976   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
3977   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
3978   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
3979   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
3980   * @throws { BusinessError } 16000011 - The context does not exist.
3981   * @throws { BusinessError } 16000012 - The application is controlled.
3982   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
3983   * @throws { BusinessError } 16000050 - Internal error.
3984   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
3985   * @throws { BusinessError } 16000055 - Installation-free timed out.
3986   * @throws { BusinessError } 16200001 - The caller has been released.
3987   * @syscap SystemCapability.Ability.AbilityRuntime.Core
3988   * @systemapi
3989   * @stagemodelonly
3990   * @since 10
3991   */
3992  /**
3993   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
3994   * you can use this method to start ability; If the caller application is in the background,
3995   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
3996   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
3997   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
3998   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
3999   *
4000   * @param { Want } want - Indicates the ability to start.
4001   * @param { StartOptions } [options] - Indicates the start options.
4002   * @returns { Promise<void> } The promise returned by the function.
4003   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
4004   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4005   * 2. Incorrect parameter types; 3. Parameter verification failed.
4006   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4007   * @throws { BusinessError } 16000002 - Incorrect ability type.
4008   * @throws { BusinessError } 16000004 - Can not start invisible component.
4009   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
4010   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
4011   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
4012   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
4013   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
4014   * @throws { BusinessError } 16000011 - The context does not exist.
4015   * @throws { BusinessError } 16000012 - The application is controlled.
4016   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
4017   * @throws { BusinessError } 16000050 - Internal error.
4018   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
4019   * @throws { BusinessError } 16000055 - Installation-free timed out.
4020   * @throws { BusinessError } 16200001 - The caller has been released.
4021   * @throws { BusinessError } 16000073 - The app clone index is invalid.
4022   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4023   * @systemapi
4024   * @stagemodelonly
4025   * @since 12
4026   */
4027  /**
4028   * If ability is multi instance, will start a recent instance. If the caller application is in foreground,
4029   * you can use this method to start ability; If the caller application is in the background,
4030   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
4031   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
4032   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
4033   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
4034   *
4035   * @param { Want } want - Indicates the ability to start.
4036   * @param { StartOptions } [options] - Indicates the start options.
4037   * @returns { Promise<void> } The promise returned by the function.
4038   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
4039   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4040   * 2. Incorrect parameter types; 3. Parameter verification failed.
4041   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4042   * @throws { BusinessError } 16000002 - Incorrect ability type.
4043   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
4044   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
4045   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
4046   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
4047   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
4048   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
4049   * @throws { BusinessError } 16000011 - The context does not exist.
4050   * @throws { BusinessError } 16000012 - The application is controlled.
4051   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
4052   * @throws { BusinessError } 16000050 - Internal error.
4053   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
4054   * @throws { BusinessError } 16000055 - Installation-free timed out.
4055   * @throws { BusinessError } 16000071 - App clone is not supported.
4056   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
4057   * @throws { BusinessError } 16000073 - The app clone index is invalid.
4058   * @throws { BusinessError } 16000076 - The app instance key is invalid.
4059   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
4060   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
4061   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
4062   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
4063   * @throws { BusinessError } 16200001 - The caller has been released.
4064   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4065   * @systemapi
4066   * @stagemodelonly
4067   * @since 14
4068   */
4069  startRecentAbility(want: Want, options?: StartOptions): Promise<void>;
4070
4071  /**
4072   * Requests certain permissions from the system.
4073   *
4074   * @param { Want } want - Indicates the dialog service to start.
4075   * @param { AsyncCallback<dialogRequest.RequestResult> } result - The callback is used to return the request result.
4076   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
4077   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4078   * @throws { BusinessError } 16000002 - Incorrect ability type.
4079   * @throws { BusinessError } 16000004 - Can not start invisible component.
4080   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
4081   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
4082   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
4083   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
4084   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
4085   * @throws { BusinessError } 16000011 - The context does not exist.
4086   * @throws { BusinessError } 16000050 - Internal error.
4087   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
4088   * @throws { BusinessError } 16000055 - Installation-free timed out.
4089   * @throws { BusinessError } 16200001 - The caller has been released.
4090   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4091   * @stagemodelonly
4092   * @since 9
4093   */
4094  /**
4095   * Starts a service extension ability that supports modal dialog. If the caller application is in foreground,
4096   * you can use this method to start service extension ability; If the caller application is in the background,
4097   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
4098   * If the target service extension ability is visible, you can start the target service extension ability;
4099   * If the target service extension ability is invisible,
4100   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
4101   *
4102   * @param { Want } want - Indicates the dialog service to start.
4103   * @param { AsyncCallback<dialogRequest.RequestResult> } result - The callback is used to return the request result.
4104   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
4105   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
4106   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4107   * @throws { BusinessError } 16000002 - Incorrect ability type.
4108   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
4109   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
4110   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
4111   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
4112   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
4113   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
4114   * @throws { BusinessError } 16000011 - The context does not exist.
4115   * @throws { BusinessError } 16000012 - The application is controlled.
4116   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
4117   * @throws { BusinessError } 16000050 - Internal error.
4118   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
4119   * @throws { BusinessError } 16000055 - Installation-free timed out.
4120   * @throws { BusinessError } 16200001 - The caller has been released.
4121   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4122   * @stagemodelonly
4123   * @since 10
4124   */
4125  requestDialogService(want: Want, result: AsyncCallback<dialogRequest.RequestResult>): void;
4126
4127  /**
4128   * Requests certain permissions from the system.
4129   *
4130   * @param { Want } want - Indicates the dialog service to start.
4131   * @returns { Promise<dialogRequest.RequestResult> } Returns the request result.
4132   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
4133   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4134   * @throws { BusinessError } 16000002 - Incorrect ability type.
4135   * @throws { BusinessError } 16000004 - Can not start invisible component.
4136   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
4137   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
4138   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
4139   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
4140   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
4141   * @throws { BusinessError } 16000011 - The context does not exist.
4142   * @throws { BusinessError } 16000050 - Internal error.
4143   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
4144   * @throws { BusinessError } 16000055 - Installation-free timed out.
4145   * @throws { BusinessError } 16200001 - The caller has been released.
4146   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4147   * @stagemodelonly
4148   * @since 9
4149   */
4150  /**
4151   * Starts a service extension ability that supports modal dialog. If the caller application is in foreground,
4152   * you can use this method to start service extension ability; If the caller application is in the background,
4153   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
4154   * If the target service extension ability is visible, you can start the target service extension ability;
4155   * If the target service extension ability is invisible,
4156   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service
4157   * extension ability.
4158   *
4159   * @param { Want } want - Indicates the dialog service to start.
4160   * @returns { Promise<dialogRequest.RequestResult> } Returns the request result.
4161   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
4162   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
4163   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4164   * @throws { BusinessError } 16000002 - Incorrect ability type.
4165   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
4166   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
4167   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
4168   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
4169   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
4170   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
4171   * @throws { BusinessError } 16000011 - The context does not exist.
4172   * @throws { BusinessError } 16000012 - The application is controlled.
4173   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
4174   * @throws { BusinessError } 16000050 - Internal error.
4175   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
4176   * @throws { BusinessError } 16000055 - Installation-free timed out.
4177   * @throws { BusinessError } 16200001 - The caller has been released.
4178   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4179   * @stagemodelonly
4180   * @since 10
4181   */
4182  requestDialogService(want: Want): Promise<dialogRequest.RequestResult>;
4183
4184  /**
4185   * Report to system when the ability is drawn completed.
4186   *
4187   * @param { AsyncCallback<void> } callback - The callback of startAbility.
4188   * @throws { BusinessError } 16000011 - The context does not exist.
4189   * @throws { BusinessError } 16000050 - Internal error.
4190   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4191   * @stagemodelonly
4192   * @since 10
4193   */
4194  /**
4195   * Report to system when the ability is drawn completed.
4196   *
4197   * @param { AsyncCallback<void> } callback - The callback of startAbility.
4198   * @throws { BusinessError } 16000011 - The context does not exist.
4199   * @throws { BusinessError } 16000050 - Internal error.
4200   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4201   * @stagemodelonly
4202   * @atomicservice
4203   * @since 11
4204   */
4205  /**
4206   * Report to system when the ability is drawn completed.
4207   *
4208   * @param { AsyncCallback<void> } callback - The callback of startAbility.
4209   * @throws { BusinessError } 16000011 - The context does not exist.
4210   * @throws { BusinessError } 16000050 - Internal error.
4211   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4212   * @stagemodelonly
4213   * @crossplatform
4214   * @atomicservice
4215   * @since 12
4216   */
4217  reportDrawnCompleted(callback: AsyncCallback<void>): void;
4218
4219  /**
4220   * Starts the UIAbility or UIExtensionAbility by type.
4221   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
4222   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
4223   *
4224   * @param { string } type - The type of target ability.
4225   * @param { Record<string, Object> } wantParam - Indicates the want parameter.
4226   * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
4227   * @param { AsyncCallback<void> } callback - The callback of startAbility.
4228   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
4229   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
4230   * <br>2.Incorrect parameter types.
4231   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4232   * @throws { BusinessError } 16000002 - Incorrect ability type.
4233   * @throws { BusinessError } 16000004 - Can not start invisible component.
4234   * @throws { BusinessError } 16000050 - Internal error.
4235   * @throws { BusinessError } 16200001 - The caller has been released.
4236   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4237   * @stagemodelonly
4238   * @atomicservice
4239   * @since 11
4240   */
4241   /**
4242   * Starts the UIAbility or UIExtensionAbility by type.
4243   * If the caller application is in the background, it is not allowed to call this interface.
4244   *
4245   * @param { string } type - The type of target ability.
4246   * @param { Record<string, Object> } wantParam - Indicates the want parameter.
4247   * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
4248   * @param { AsyncCallback<void> } callback - The callback of startAbility.
4249   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
4250   * <br>2.Incorrect parameter types.
4251   * @throws { BusinessError } 16000050 - Internal error.
4252   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4253   * @stagemodelonly
4254   * @atomicservice
4255   * @since 12
4256   */
4257  startAbilityByType(type: string, wantParam: Record<string, Object>,
4258    abilityStartCallback: AbilityStartCallback, callback: AsyncCallback<void>): void;
4259
4260  /**
4261   * Starts the UIAbility or UIExtensionAbility by type.
4262   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
4263   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
4264   *
4265   * @param { string } type - The type of target ability.
4266   * @param { Record<string, Object> } wantParam - Indicates the want parameter.
4267   * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
4268   * @returns { Promise<void> } The promise returned by the function.
4269   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
4270   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
4271   * <br>2.Incorrect parameter types.
4272   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4273   * @throws { BusinessError } 16000002 - Incorrect ability type.
4274   * @throws { BusinessError } 16000004 - Can not start invisible component.
4275   * @throws { BusinessError } 16000050 - Internal error.
4276   * @throws { BusinessError } 16200001 - The caller has been released.
4277   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4278   * @stagemodelonly
4279   * @atomicservice
4280   * @since 11
4281   */
4282  /**
4283   * Starts the UIAbility or UIExtensionAbility by type.
4284   * If the caller application is in the background, it is not allowed to call this interface.
4285   *
4286   * @param { string } type - The type of target ability.
4287   * @param { Record<string, Object> } wantParam - Indicates the want parameter.
4288   * @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
4289   * @returns { Promise<void> } The promise returned by the function.
4290   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
4291   * <br>2.Incorrect parameter types.
4292   * @throws { BusinessError } 16000050 - Internal error.
4293   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4294   * @stagemodelonly
4295   * @atomicservice
4296   * @since 12
4297   */
4298  startAbilityByType(type: string, wantParam: Record<string, Object>,
4299    abilityStartCallback: AbilityStartCallback): Promise<void>;
4300
4301  /**
4302   * Requests the Modal UIExtensionAbility.
4303   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
4304   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
4305   *
4306   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
4307   * @param { AsyncCallback<void> } callback - The callback of requestModalUIExtension.
4308   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
4309   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
4310   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
4311   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4312   * @throws { BusinessError } 16000002 - Incorrect ability type.
4313   * @throws { BusinessError } 16000004 - Can not start invisible component.
4314   * @throws { BusinessError } 16000050 - Internal error.
4315   * @throws { BusinessError } 16200001 - The caller has been released.
4316   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4317   * @systemapi
4318   * @stagemodelonly
4319   * @since 11
4320   */
4321  /**
4322   * Requests the specified foreground application to start the UIExtensionAbility of the corresponding type. The foreground
4323   * application is specified by bundleName in want.parameters. If bundleName is left unspecified, or if the application
4324   * specified by bundleName is not running in the foreground or does not exist, the UIExtensionAbility is directly started
4325   * on the system interface. The UIExtensionAbility to start is determined by the combination of the bundleName, abilityName,
4326   * and moduleName fields in want, and its type is determined by the ability.want.params.uiExtensionType field in want.parameters.
4327   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
4328   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
4329   *
4330   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
4331   * @param { AsyncCallback<void> } callback - The callback of requestModalUIExtension.
4332   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
4333   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
4334   * @throws { BusinessError } 16000050 - Internal error.
4335   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4336   * @systemapi
4337   * @stagemodelonly
4338   * @since 12
4339   */
4340  requestModalUIExtension(pickerWant: Want, callback: AsyncCallback<void>): void;
4341
4342  /**
4343   * Requests the Modal UIExtensionAbility.
4344   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
4345   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
4346   *
4347   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
4348   * @returns { Promise<void> } The promise returned by the requestModalUIExtension.
4349   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
4350   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
4351   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
4352   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4353   * @throws { BusinessError } 16000002 - Incorrect ability type.
4354   * @throws { BusinessError } 16000004 - Can not start invisible component.
4355   * @throws { BusinessError } 16000050 - Internal error.
4356   * @throws { BusinessError } 16200001 - The caller has been released.
4357   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4358   * @systemapi
4359   * @stagemodelonly
4360   * @since 11
4361   */
4362  /**
4363   * Requests the specified foreground application to start the UIExtensionAbility of the corresponding type. The foreground
4364   * application is specified by bundleName in want.parameters. If bundleName is left unspecified, or if the application
4365   * specified by bundleName is not running in the foreground or does not exist, the UIExtensionAbility is directly started
4366   * on the system interface. The UIExtensionAbility to start is determined by the combination of the bundleName, abilityName,
4367   * and moduleName fields in want, and its type is determined by the ability.want.params.uiExtensionType field in want.parameters.
4368   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
4369   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
4370   *
4371   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
4372   * @returns { Promise<void> } The promise returned by the requestModalUIExtension.
4373   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
4374   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
4375   * @throws { BusinessError } 16000050 - Internal error.
4376   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4377   * @systemapi
4378   * @stagemodelonly
4379   * @since 12
4380   */
4381  requestModalUIExtension(pickerWant: Want): Promise<void>;
4382
4383  /**
4384   * Full-screen pop-us startup atomic service.
4385   *
4386   * @param { string } appId - Globally unique identifier of an application, which is allocated by the cloud.
4387   * @param { AtomicServiceOptions } [options] - Indicates the atomic service start options.
4388   * @returns { Promise<AbilityResult> } Returns the result of openAtomicService.
4389   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
4390   * @throws { BusinessError } 16000002 - Incorrect ability type.
4391   * @throws { BusinessError } 16000003 - The specified ID does not exist.
4392   * @throws { BusinessError } 16000004 - Can not start invisible component
4393   * @throws { BusinessError } 16000011 - The context does not exist.
4394   * @throws { BusinessError } 16000012 - The application is controlled.
4395   * @throws { BusinessError } 16000050 - Internal error.
4396   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
4397   * @throws { BusinessError } 16000055 - Installation-free timed out.
4398   * @throws { BusinessError } 16200001 - The caller has been released.
4399   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4400   * @stagemodelonly
4401   * @atomicservice
4402   * @since 12
4403   */
4404  openAtomicService(appId: string, options?: AtomicServiceOptions): Promise<AbilityResult>;
4405
4406  /**
4407   * Move current ability to background.
4408   *
4409   * @returns { Promise<void> } Returns the result of moveAbilityToBackground.
4410   * @throws { BusinessError } 16000011 - The context does not exist.
4411   * @throws { BusinessError } 16000050 - Internal error.
4412   * @throws { BusinessError } 16000061 - Operation not supported.
4413   * @throws { BusinessError } 16000065 - The API can be called only when the ability is running in the foreground.
4414   * @throws { BusinessError } 16000066 - An ability cannot switch to the foreground or background in Wukong mode.
4415   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4416   * @stagemodelonly
4417   * @atomicservice
4418   * @since 12
4419   */
4420  moveAbilityToBackground(): Promise<void>;
4421
4422  /**
4423   * Show current ability. The ability needs to be started by UIAbilityContext.startAbility
4424   * with input parameter options.processMode setting to NEW_PROCESS_ATTACH_TO_STATUS_BAR_ITEM.
4425   *
4426   * @returns { Promise<void> } The promise returned by the function.
4427   * @throws { BusinessError } 801 - Capability not support.
4428   * @throws { BusinessError } 16000050 - Internal error.
4429   * @throws { BusinessError } 16000067 - The StartOptions check failed.
4430   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4431   * @stagemodelonly
4432   * @since 12
4433   */
4434  showAbility(): Promise<void>;
4435
4436  /**
4437   * Hide current ability. The ability needs to be started by UIAbilityContext.startAbility
4438   * with input parameter options.processMode setting to NEW_PROCESS_ATTACH_TO_STATUS_BAR_ITEM.
4439   *
4440   * @returns { Promise<void> } The promise returned by the function.
4441   * @throws { BusinessError } 801 - Capability not support.
4442   * @throws { BusinessError } 16000050 - Internal error.
4443   * @throws { BusinessError } 16000067 - The StartOptions check failed.
4444   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4445   * @stagemodelonly
4446   * @since 12
4447   */
4448  hideAbility(): Promise<void>;
4449
4450  /**
4451   * Set whether restoration is enabled when the UIAbility is switched back from the background.
4452   *
4453   * @param { boolean } enabled - The flag that indicates whether restoration is enabled when the UIAbility is switched
4454   * back from the background.
4455   * @throws { BusinessError } 401 - If the input parameter is not valid parameter.
4456   * @throws { BusinessError } 16000011 - The context does not exist.
4457   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4458   * @stagemodelonly
4459   * @atomicservice
4460   * @since 13
4461   */
4462  setRestoreEnabled(enabled: boolean): void;
4463
4464  /**
4465   * Starts a UI service extension ability.
4466   * If the target UI service extension ability is visible, you can start the target UI service extension ability;
4467   * If the target UI service extension ability is invisible,
4468   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UI service extension ability.
4469   *
4470   * @param { Want } want - Indicates the want info to start.
4471   * @returns { Promise<void> } The promise returned by the function.
4472   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
4473   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4474   * 2. Incorrect parameter types; 3. Parameter verification failed.
4475   * @throws { BusinessError } 801 - Capability not supported.
4476   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4477   * @throws { BusinessError } 16000002 - Incorrect ability type.
4478   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
4479   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
4480   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
4481   * @throws { BusinessError } 16000011 - The context does not exist.
4482   * @throws { BusinessError } 16000012 - The application is controlled.
4483   * @throws { BusinessError } 16000013 - The EDM prohibits the application from launching.
4484   * @throws { BusinessError } 16000019 - No matching ability is found.
4485   * @throws { BusinessError } 16000050 - Internal error.
4486   * @throws { BusinessError } 16200001 - The caller has been released.
4487   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4488   * @stagemodelonly
4489   * @atomicservice
4490   * @since 14
4491   */
4492  startUIServiceExtensionAbility(want: Want): Promise<void>;
4493
4494  /**
4495   * Connects to a UI service extension ability.
4496   * If the target UI service extension ability is visible, you can connect the target UI service extension ability;
4497   * If the target UI service extension ability is invisible,
4498   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible UI service extension ability.
4499   *
4500   * @param { Want } want - Indicates the want info to connect.
4501   * @param { UIServiceExtensionConnectCallback } callback - The callback of connection.
4502   * @returns { Promise<UIServiceProxy> } The promise to get UIServiceProxy.
4503   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
4504   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4505   * 2. Incorrect parameter types; 3. Parameter verification failed.
4506   * @throws { BusinessError } 801 - Capability not supported.
4507   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4508   * @throws { BusinessError } 16000002 - Incorrect ability type.
4509   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
4510   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
4511   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
4512   * @throws { BusinessError } 16000011 - The context does not exist.
4513   * @throws { BusinessError } 16000013 - The EDM prohibits the application from launching.
4514   * @throws { BusinessError } 16000050 - Internal error.
4515   * @throws { BusinessError } 16000055 - Installation-free timed out.
4516   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4517   * @stagemodelonly
4518   * @atomicservice
4519   * @since 14
4520   */
4521  connectUIServiceExtensionAbility(want: Want, callback: UIServiceExtensionConnectCallback) : Promise<UIServiceProxy>;
4522
4523  /**
4524   * Disconnects from a UI service extension, in contrast to {@link connectUIServiceExtensionAbility}.
4525   *
4526   * @param { UIServiceProxy } proxy - The UI service proxy return by connectUIServiceExtensionAbility.
4527   * @returns { Promise<void> } The promise returned by the function.
4528   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4529   * 2. Incorrect parameter types; 3. Parameter verification failed.
4530   * @throws { BusinessError } 16000011 - The context does not exist.
4531   * @throws { BusinessError } 16000050 - Internal error.
4532   * @syscap SystemCapability.Ability.AbilityRuntime.Core
4533   * @stagemodelonly
4534   * @atomicservice
4535   * @since 14
4536   */
4537  disconnectUIServiceExtensionAbility(proxy: UIServiceProxy): Promise<void>;
4538}
4539