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