• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023-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
21
22import type { AsyncCallback } from '../@ohos.base';
23import ExtensionContext from './ExtensionContext';
24import type Want from '../@ohos.app.ability.Want';
25import type StartOptions from '../@ohos.app.ability.StartOptions';
26/*** if arkts 1.1 */
27import type { AbilityResult } from '../ability/abilityResult';
28import type { ConnectOptions } from '../ability/connectOptions';
29import type AtomicServiceOptions from '../@ohos.app.ability.AtomicServiceOptions';
30import OpenLinkOptions from '../@ohos.app.ability.OpenLinkOptions';
31import type ConfigurationConstant from '../@ohos.app.ability.ConfigurationConstant';
32import type UIServiceProxy from './UIServiceProxy';
33import type UIServiceExtensionConnectCallback from './UIServiceExtensionConnectCallback';
34/*** endif */
35/*** if arkts 1.2 */
36import { AbilityResult } from '../ability/abilityResult';
37/*** endif */
38
39/**
40 * The context of UI extension. It allows access to UIExtension-specific resources.
41 *
42 * @extends ExtensionContext
43 * @syscap SystemCapability.Ability.AbilityRuntime.Core
44 * @stagemodelonly
45 * @since arkts {'1.1':'10', '1.2':'20'}
46 * @arkts 1.1&1.2
47 */
48declare class UIExtensionContext extends ExtensionContext {
49  /**
50   * UI extension uses this method to start a specific ability.If the caller application is in foreground,
51   * you can use this method to start ability; If the caller application is in the background,
52   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
53   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
54   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
55   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
56   *
57   * @param { Want } want - Indicates the ability to start.
58   * @param { AsyncCallback<void> } callback - The callback of startAbility.
59   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
60   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
61   * @throws { BusinessError } 16000001 - The specified ability does not exist.
62   * @throws { BusinessError } 16000002 - Incorrect ability type.
63   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
64   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
65   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
66   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
67   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
68   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
69   * @throws { BusinessError } 16000011 - The context does not exist.
70   * @throws { BusinessError } 16000012 - The application is controlled.
71   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
72   * @throws { BusinessError } 16000050 - Internal error.
73   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
74   * @throws { BusinessError } 16000055 - Installation-free timed out.
75   * @throws { BusinessError } 16200001 - The caller has been released.
76   * @syscap SystemCapability.Ability.AbilityRuntime.Core
77   * @stagemodelonly
78   * @since 10
79   */
80  /**
81   * UI extension uses this method to start a specific ability.If the caller application is in foreground,
82   * you can use this method to start ability; If the caller application is in the background,
83   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
84   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
85   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
86   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
87   *
88   * @param { Want } want - Indicates the ability to start.
89   * @param { AsyncCallback<void> } callback - The callback of startAbility.
90   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
91   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
92   * @throws { BusinessError } 16000001 - The specified ability does not exist.
93   * @throws { BusinessError } 16000002 - Incorrect ability type.
94   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
95   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
96   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
97   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
98   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
99   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
100   * @throws { BusinessError } 16000011 - The context does not exist.
101   * @throws { BusinessError } 16000012 - The application is controlled.
102   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
103   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
104   * @throws { BusinessError } 16000019 - No matching ability is found.
105   * @throws { BusinessError } 16000050 - Internal error.
106   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
107   * @throws { BusinessError } 16000055 - Installation-free timed out.
108   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
109   * @throws { BusinessError } 16000070 - The extension cannot start the service.
110   * @throws { BusinessError } 16000073 - The app clone index is invalid.
111   * @throws { BusinessError } 16200001 - The caller has been released.
112   * @syscap SystemCapability.Ability.AbilityRuntime.Core
113   * @stagemodelonly
114   * @since 12
115   */
116  /**
117   * UI extension uses this method to start a specific ability.If the caller application is in foreground,
118   * you can use this method to start ability; If the caller application is in the background,
119   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
120   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
121   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
122   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
123   *
124   * @param { Want } want - Indicates the ability to start.
125   * @param { AsyncCallback<void> } callback - The callback of startAbility.
126   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
127   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
128   * @throws { BusinessError } 16000001 - The specified ability does not exist.
129   * @throws { BusinessError } 16000002 - Incorrect ability type.
130   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
131   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
132   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
133   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
134   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
135   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
136   * @throws { BusinessError } 16000011 - The context does not exist.
137   * @throws { BusinessError } 16000012 - The application is controlled.
138   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
139   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
140   * @throws { BusinessError } 16000019 - No matching ability is found.
141   * @throws { BusinessError } 16000050 - Internal error.
142   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
143   * @throws { BusinessError } 16000055 - Installation-free timed out.
144   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
145   * @throws { BusinessError } 16000070 - The extension cannot start the service.
146   * @throws { BusinessError } 16000071 - App clone is not supported.
147   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
148   * @throws { BusinessError } 16000073 - The app clone index is invalid.
149   * @throws { BusinessError } 16000076 - The app instance key is invalid.
150   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
151   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
152   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
153   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
154   * @throws { BusinessError } 16200001 - The caller has been released.
155   * @syscap SystemCapability.Ability.AbilityRuntime.Core
156   * @stagemodelonly
157   * @since arkts {'1.1':'14', '1.2':'20'}
158   * @arkts 1.1&1.2
159   */
160  startAbility(want: Want, callback: AsyncCallback<void>): void;
161
162  /**
163   * UI extension uses this method to start a specific ability.If the caller application is in foreground,
164   * you can use this method to start ability; If the caller application is in the background,
165   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
166   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
167   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
168   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
169   *
170   * @param { Want } want - Indicates the ability to start.
171   * @param { StartOptions } options - Indicates the start options.
172   * @param { AsyncCallback<void> } callback - The callback of startAbility.
173   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
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 } 16000004 - Cannot start an invisible component.
177   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
178   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
179   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
180   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
181   * @throws { BusinessError } 16000011 - The context does not exist.
182   * @throws { BusinessError } 16000012 - The application is controlled.
183   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
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 10
191   */
192  /**
193   * UI extension uses this method to start a specific ability.If the caller application is in foreground,
194   * you can use this method to start ability; If the caller application is in the background,
195   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
196   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
197   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
198   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
199   *
200   * @param { Want } want - Indicates the ability to start.
201   * @param { StartOptions } options - Indicates the start options.
202   * @param { AsyncCallback<void> } callback - The callback of startAbility.
203   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
204   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
205   * @throws { BusinessError } 16000001 - The specified ability does not exist.
206   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
207   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
208   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
209   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
210   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
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 } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
215   * @throws { BusinessError } 16000019 - No matching ability is found.
216   * @throws { BusinessError } 16000050 - Internal error.
217   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
218   * @throws { BusinessError } 16000055 - Installation-free timed out.
219   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
220   * @throws { BusinessError } 16000070 - The extension cannot start the service.
221   * @throws { BusinessError } 16000073 - The app clone index is invalid.
222   * @throws { BusinessError } 16200001 - The caller has been released.
223   * @syscap SystemCapability.Ability.AbilityRuntime.Core
224   * @stagemodelonly
225   * @since 12
226   */
227  /**
228   * UI extension uses this method to start a specific ability.If the caller application is in foreground,
229   * you can use this method to start ability; If the caller application is in the background,
230   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
231   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
232   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
233   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
234   *
235   * @param { Want } want - Indicates the ability to start.
236   * @param { StartOptions } options - Indicates the start options.
237   * @param { AsyncCallback<void> } callback - The callback of startAbility.
238   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
239   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
240   * @throws { BusinessError } 16000001 - The specified ability does not exist.
241   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
242   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
243   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
244   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
245   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
246   * @throws { BusinessError } 16000011 - The context does not exist.
247   * @throws { BusinessError } 16000012 - The application is controlled.
248   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
249   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
250   * @throws { BusinessError } 16000019 - No matching ability is found.
251   * @throws { BusinessError } 16000050 - Internal error.
252   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
253   * @throws { BusinessError } 16000055 - Installation-free timed out.
254   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
255   * @throws { BusinessError } 16000070 - The extension cannot start the service.
256   * @throws { BusinessError } 16000071 - App clone is not supported.
257   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
258   * @throws { BusinessError } 16000073 - The app clone index is invalid.
259   * @throws { BusinessError } 16000076 - The app instance key is invalid.
260   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
261   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
262   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
263   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
264   * @throws { BusinessError } 16200001 - The caller has been released.
265   * @syscap SystemCapability.Ability.AbilityRuntime.Core
266   * @stagemodelonly
267   * @since arkts {'1.1':'14', '1.2':'20'}
268   * @arkts 1.1&1.2
269   */
270  startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
271
272  /**
273   * UI extension uses this method to start a specific ability.If the caller application is in foreground,
274   * you can use this method to start ability; If the caller application is in the background,
275   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
276   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
277   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
278   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
279   *
280   * @param { Want } want - Indicates the ability to start.
281   * @param { StartOptions } [options] - Indicates the start options.
282   * @returns { Promise<void> } The promise returned by the function.
283   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
284   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
285   * @throws { BusinessError } 16000001 - The specified ability does not exist.
286   * @throws { BusinessError } 16000002 - Incorrect ability type.
287   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
288   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
289   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
290   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
291   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
292   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
293   * @throws { BusinessError } 16000011 - The context does not exist.
294   * @throws { BusinessError } 16000012 - The application is controlled.
295   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
296   * @throws { BusinessError } 16000050 - Internal error.
297   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
298   * @throws { BusinessError } 16000055 - Installation-free timed out.
299   * @throws { BusinessError } 16200001 - The caller has been released.
300   * @syscap SystemCapability.Ability.AbilityRuntime.Core
301   * @stagemodelonly
302   * @since 10
303   */
304  /**
305   * UI extension uses this method to start a specific ability.If the caller application is in foreground,
306   * you can use this method to start ability; If the caller application is in the background,
307   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
308   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
309   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
310   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
311   *
312   * @param { Want } want - Indicates the ability to start.
313   * @param { StartOptions } [options] - Indicates the start options.
314   * @returns { Promise<void> } The promise returned by the function.
315   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
316   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
317   * @throws { BusinessError } 16000001 - The specified ability does not exist.
318   * @throws { BusinessError } 16000002 - Incorrect ability type.
319   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
320   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
321   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
322   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
323   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
324   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
325   * @throws { BusinessError } 16000011 - The context does not exist.
326   * @throws { BusinessError } 16000012 - The application is controlled.
327   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
328   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
329   * @throws { BusinessError } 16000019 - No matching ability is found.
330   * @throws { BusinessError } 16000050 - Internal error.
331   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
332   * @throws { BusinessError } 16000055 - Installation-free timed out.
333   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
334   * @throws { BusinessError } 16000070 - The extension cannot start the service.
335   * @throws { BusinessError } 16000073 - The app clone index is invalid.
336   * @throws { BusinessError } 16200001 - The caller has been released.
337   * @syscap SystemCapability.Ability.AbilityRuntime.Core
338   * @stagemodelonly
339   * @since 12
340   */
341  /**
342   * UI extension uses this method to start a specific ability.If the caller application is in foreground,
343   * you can use this method to start ability; If the caller application is in the background,
344   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
345   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
346   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
347   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
348   *
349   * @param { Want } want - Indicates the ability to start.
350   * @param { StartOptions } [options] - Indicates the start options.
351   * @returns { Promise<void> } The promise returned by the function.
352   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
353   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
354   * @throws { BusinessError } 16000001 - The specified ability does not exist.
355   * @throws { BusinessError } 16000002 - Incorrect ability type.
356   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
357   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
358   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
359   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
360   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
361   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
362   * @throws { BusinessError } 16000011 - The context does not exist.
363   * @throws { BusinessError } 16000012 - The application is controlled.
364   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
365   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
366   * @throws { BusinessError } 16000019 - No matching ability is found.
367   * @throws { BusinessError } 16000050 - Internal error.
368   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
369   * @throws { BusinessError } 16000055 - Installation-free timed out.
370   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
371   * @throws { BusinessError } 16000070 - The extension cannot start the service.
372   * @throws { BusinessError } 16000071 - App clone is not supported.
373   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
374   * @throws { BusinessError } 16000073 - The app clone index is invalid.
375   * @throws { BusinessError } 16000076 - The app instance key is invalid.
376   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
377   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
378   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
379   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
380   * @throws { BusinessError } 16200001 - The caller has been released.
381   * @syscap SystemCapability.Ability.AbilityRuntime.Core
382   * @stagemodelonly
383   * @since arkts {'1.1':'14', '1.2':'20'}
384   * @arkts 1.1&1.2
385   */
386  startAbility(want: Want, options?: StartOptions): Promise<void>;
387
388  /**
389   * UI extension uses this method to start a specific ability by implicit want.If the caller application is in foreground,
390   * you can use this method to start ability; If the caller application is in the background,
391   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
392   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
393   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
394   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
395   *
396   * @param { string } link - Indicates the ability to start.
397   * @param { OpenLinkOptions } [options] - Indicates the open link options.
398   * @param { AsyncCallback<AbilityResult> } [callback] - The callback is used to return the ability result.
399   * @returns { Promise<void> } The promise returned by the function.
400   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
401   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
402   * @throws { BusinessError } 16000001 - The specified ability does not exist.
403   * @throws { BusinessError } 16000002 - Incorrect ability type.
404   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
405   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
406   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
407   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
408   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
409   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
410   * @throws { BusinessError } 16000011 - The context does not exist.
411   * @throws { BusinessError } 16000012 - The application is controlled.
412   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
413   * @throws { BusinessError } 16000019 - No matching ability is found.
414   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
415   * @throws { BusinessError } 16200001 - The caller has been released.
416   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
417   * @syscap SystemCapability.Ability.AbilityRuntime.Core
418   * @stagemodelonly
419   * @since 12
420   */
421  openLink(link: string, options?: OpenLinkOptions, callback?: AsyncCallback<AbilityResult>): Promise<void>;
422
423  /**
424   * Starts an ability and returns the execution result when the ability is destroyed.
425   * If the caller application is in foreground, you can use this method to start ability; If the caller application
426   * is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
427   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
428   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
429   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
430   *
431   * @param { Want } want - Indicates the ability to start.
432   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
433   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
434   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
435   * @throws { BusinessError } 16000001 - The specified ability does not exist.
436   * @throws { BusinessError } 16000002 - Incorrect ability type.
437   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
438   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
439   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
440   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
441   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
442   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
443   * @throws { BusinessError } 16000011 - The context does not exist.
444   * @throws { BusinessError } 16000012 - The application is controlled.
445   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
446   * @throws { BusinessError } 16000050 - Internal error.
447   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
448   * @throws { BusinessError } 16000055 - Installation-free timed out.
449   * @throws { BusinessError } 16200001 - The caller has been released.
450   * @syscap SystemCapability.Ability.AbilityRuntime.Core
451   * @stagemodelonly
452   * @since 10
453   */
454  /**
455   * Starts an ability and returns the execution result when the ability is destroyed.
456   * If the caller application is in foreground, you can use this method to start ability; If the caller application
457   * is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
458   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
459   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
460   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
461   *
462   * @param { Want } want - Indicates the ability to start.
463   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result 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 } 16000001 - The specified ability does not exist.
467   * @throws { BusinessError } 16000002 - Incorrect ability type.
468   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
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 } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
474   * @throws { BusinessError } 16000011 - The context does not exist.
475   * @throws { BusinessError } 16000012 - The application is controlled.
476   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
477   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
478   * @throws { BusinessError } 16000019 - No matching ability is found.
479   * @throws { BusinessError } 16000050 - Internal error.
480   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
481   * @throws { BusinessError } 16000055 - Installation-free timed out.
482   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
483   * @throws { BusinessError } 16000070 - The extension cannot start the service.
484   * @throws { BusinessError } 16000073 - The app clone index is invalid.
485   * @throws { BusinessError } 16200001 - The caller has been released.
486   * @syscap SystemCapability.Ability.AbilityRuntime.Core
487   * @stagemodelonly
488   * @since 12
489   */
490  /**
491   * Starts an ability and returns the execution result when the ability is destroyed.
492   * If the caller application is in foreground, you can use this method to start ability; If the caller application
493   * is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
494   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
495   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
496   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
497   *
498   * @param { Want } want - Indicates the ability to start.
499   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
500   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
501   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
502   * @throws { BusinessError } 16000001 - The specified ability does not exist.
503   * @throws { BusinessError } 16000002 - Incorrect ability type.
504   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
505   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
506   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
507   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
508   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
509   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
510   * @throws { BusinessError } 16000011 - The context does not exist.
511   * @throws { BusinessError } 16000012 - The application is controlled.
512   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
513   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
514   * @throws { BusinessError } 16000019 - No matching ability is found.
515   * @throws { BusinessError } 16000050 - Internal error.
516   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
517   * @throws { BusinessError } 16000055 - Installation-free timed out.
518   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
519   * @throws { BusinessError } 16000070 - The extension cannot start the service.
520   * @throws { BusinessError } 16000071 - App clone is not supported.
521   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
522   * @throws { BusinessError } 16000073 - The app clone index is invalid.
523   * @throws { BusinessError } 16000076 - The app instance key is invalid.
524   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
525   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
526   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
527   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
528   * @throws { BusinessError } 16200001 - The caller has been released.
529   * @syscap SystemCapability.Ability.AbilityRuntime.Core
530   * @stagemodelonly
531   * @since 14
532   */
533  startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): void;
534
535  /**
536   * Starts an ability and returns the execution result when the ability is destroyed.
537   * If the caller application is in foreground, you can use this method to start ability; If the caller application
538   * is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
539   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
540   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
541   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
542   *
543   * @param { Want } want - Indicates the ability to start.
544   * @param { StartOptions } options - Indicates the start options.
545   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
546   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
547   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
548   * @throws { BusinessError } 16000001 - The specified ability does not exist.
549   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
550   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
551   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
552   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
553   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
554   * @throws { BusinessError } 16000011 - The context does not exist.
555   * @throws { BusinessError } 16000012 - The application is controlled.
556   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
557   * @throws { BusinessError } 16000050 - Internal error.
558   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
559   * @throws { BusinessError } 16000055 - Installation-free timed out.
560   * @throws { BusinessError } 16200001 - The caller has been released.
561   * @syscap SystemCapability.Ability.AbilityRuntime.Core
562   * @stagemodelonly
563   * @since 10
564   */
565  /**
566   * Starts an ability and returns the execution result when the ability is destroyed.
567   * If the caller application is in foreground, you can use this method to start ability; If the caller application
568   * is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
569   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
570   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
571   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
572   *
573   * @param { Want } want - Indicates the ability to start.
574   * @param { StartOptions } options - Indicates the start options.
575   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
576   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
577   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
578   * @throws { BusinessError } 16000001 - The specified ability does not exist.
579   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
580   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
581   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
582   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
583   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
584   * @throws { BusinessError } 16000011 - The context does not exist.
585   * @throws { BusinessError } 16000012 - The application is controlled.
586   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
587   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
588   * @throws { BusinessError } 16000019 - No matching ability is found.
589   * @throws { BusinessError } 16000050 - Internal error.
590   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
591   * @throws { BusinessError } 16000055 - Installation-free timed out.
592   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
593   * @throws { BusinessError } 16000070 - The extension cannot start the service.
594   * @throws { BusinessError } 16000073 - The app clone index is invalid.
595   * @throws { BusinessError } 16200001 - The caller has been released.
596   * @syscap SystemCapability.Ability.AbilityRuntime.Core
597   * @stagemodelonly
598   * @since 12
599   */
600  /**
601   * Starts an ability and returns the execution result when the ability is destroyed.
602   * If the caller application is in foreground, you can use this method to start ability; If the caller application
603   * 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   * @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
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 } 16000004 - Cannot start an invisible component.
615   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
616   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
617   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
618   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
619   * @throws { BusinessError } 16000011 - The context does not exist.
620   * @throws { BusinessError } 16000012 - The application is controlled.
621   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
622   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
623   * @throws { BusinessError } 16000019 - No matching ability is found.
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 } 16000069 - The extension cannot start the third party application.
628   * @throws { BusinessError } 16000070 - The extension cannot start the service.
629   * @throws { BusinessError } 16000071 - App clone is not supported.
630   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
631   * @throws { BusinessError } 16000073 - The app clone index is invalid.
632   * @throws { BusinessError } 16000076 - The app instance key is invalid.
633   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
634   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
635   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
636   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
637   * @throws { BusinessError } 16200001 - The caller has been released.
638   * @syscap SystemCapability.Ability.AbilityRuntime.Core
639   * @stagemodelonly
640   * @since 14
641   */
642  startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback<AbilityResult>): void;
643
644  /**
645   * Starts an ability and returns the execution result when the ability is destroyed.
646   * If the caller application is in foreground, you can use this method to start ability; If the caller application
647   * is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
648   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
649   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
650   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
651   *
652   * @param { Want } want - Indicates the ability to start.
653   * @param { StartOptions } [options] - Indicates the start options.
654   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
655   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
656   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
657   * @throws { BusinessError } 16000001 - The specified ability does not exist.
658   * @throws { BusinessError } 16000002 - Incorrect ability type.
659   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
660   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
661   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
662   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
663   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
664   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
665   * @throws { BusinessError } 16000011 - The context does not exist.
666   * @throws { BusinessError } 16000012 - The application is controlled.
667   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
668   * @throws { BusinessError } 16000050 - Internal error.
669   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
670   * @throws { BusinessError } 16000055 - Installation-free timed out.
671   * @throws { BusinessError } 16200001 - The caller has been released.
672   * @syscap SystemCapability.Ability.AbilityRuntime.Core
673   * @stagemodelonly
674   * @since 10
675   */
676  /**
677   * Starts an ability and returns the execution result when the ability is destroyed.
678   * If the caller application is in foreground, you can use this method to start ability; If the caller application
679   * is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
680   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
681   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
682   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
683   *
684   * @param { Want } want - Indicates the ability to start.
685   * @param { StartOptions } [options] - Indicates the start options.
686   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
687   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
688   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
689   * @throws { BusinessError } 16000001 - The specified ability does not exist.
690   * @throws { BusinessError } 16000002 - Incorrect ability type.
691   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
692   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
693   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
694   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
695   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
696   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
697   * @throws { BusinessError } 16000011 - The context does not exist.
698   * @throws { BusinessError } 16000012 - The application is controlled.
699   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
700   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
701   * @throws { BusinessError } 16000019 - No matching ability is found.
702   * @throws { BusinessError } 16000050 - Internal error.
703   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
704   * @throws { BusinessError } 16000055 - Installation-free timed out.
705   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
706   * @throws { BusinessError } 16000070 - The extension cannot start the service.
707   * @throws { BusinessError } 16000073 - The app clone index is invalid.
708   * @throws { BusinessError } 16200001 - The caller has been released.
709   * @syscap SystemCapability.Ability.AbilityRuntime.Core
710   * @stagemodelonly
711   * @since 12
712   */
713  /**
714   * Starts an ability and returns the execution result when the ability is destroyed.
715   * If the caller application is in foreground, you can use this method to start ability; If the caller application
716   * is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
717   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
718   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
719   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
720   *
721   * @param { Want } want - Indicates the ability to start.
722   * @param { StartOptions } [options] - Indicates the start options.
723   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
724   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
725   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
726   * @throws { BusinessError } 16000001 - The specified ability does not exist.
727   * @throws { BusinessError } 16000002 - Incorrect ability type.
728   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
729   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
730   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
731   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
732   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
733   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
734   * @throws { BusinessError } 16000011 - The context does not exist.
735   * @throws { BusinessError } 16000012 - The application is controlled.
736   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
737   * @throws { BusinessError } 16000018 - Redirection to a third-party application is not allowed in API version greater than 11.
738   * @throws { BusinessError } 16000019 - No matching ability is found.
739   * @throws { BusinessError } 16000050 - Internal error.
740   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
741   * @throws { BusinessError } 16000055 - Installation-free timed out.
742   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
743   * @throws { BusinessError } 16000070 - The extension cannot start the service.
744   * @throws { BusinessError } 16000071 - App clone is not supported.
745   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
746   * @throws { BusinessError } 16000073 - The app clone index is invalid.
747   * @throws { BusinessError } 16000076 - The app instance key is invalid.
748   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
749   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
750   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
751   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
752   * @throws { BusinessError } 16200001 - The caller has been released.
753   * @syscap SystemCapability.Ability.AbilityRuntime.Core
754   * @stagemodelonly
755   * @since 14
756   */
757  startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityResult>;
758
759  /**
760   * Starts a new ability using the original caller information, and returns the execution result when the ability
761   * is destroyed.
762   * If the caller application is in foreground, you can use this method to start ability; If the caller application
763   * is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
764   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
765   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
766   *
767   * @param { Want } want - Indicates the ability to start.
768   * @param { StartOptions } [options] - Indicates the start options.
769   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
770   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
771   * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app.
772   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
773   * @throws { BusinessError } 16000001 - The specified ability does not exist.
774   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
775   * @throws { BusinessError } 16000050 - Internal error.
776   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
777   * @throws { BusinessError } 16000070 - The extension cannot start the service.
778   * @throws { BusinessError } 16000073 - The app clone index is invalid.
779   * @syscap SystemCapability.Ability.AbilityRuntime.Core
780   * @systemapi
781   * @stagemodelonly
782   * @since 12
783   */
784  /**
785   * Starts a new ability using the original caller information, and returns the execution result when the ability
786   * is destroyed.
787   * If the caller application is in foreground, you can use this method to start ability; If the caller application
788   * is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
789   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
790   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
791   *
792   * @param { Want } want - Indicates the ability to start.
793   * @param { StartOptions } [options] - Indicates the start options.
794   * @returns { Promise<AbilityResult> } Returns the result of startAbility.
795   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
796   * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app.
797   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
798   * @throws { BusinessError } 16000001 - The specified ability does not exist.
799   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
800   * @throws { BusinessError } 16000050 - Internal error.
801   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
802   * @throws { BusinessError } 16000070 - The extension cannot start the service.
803   * @throws { BusinessError } 16000071 - App clone is not supported.
804   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
805   * @throws { BusinessError } 16000073 - The app clone index is invalid.
806   * @throws { BusinessError } 16000076 - The app instance key is invalid.
807   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
808   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
809   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
810   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
811   * @syscap SystemCapability.Ability.AbilityRuntime.Core
812   * @systemapi
813   * @stagemodelonly
814   * @since 14
815   */
816  startAbilityForResultAsCaller(want: Want, options?: StartOptions): Promise<AbilityResult>;
817
818  /**
819   * Connects the current ability to an service extension ability.
820   * If the target service extension ability is visible, you can connect the target service extension ability;
821   * If the target service extension ability is invisible,
822   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible service extension ability.
823   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
824   *
825   * @param { Want } want - The element name of the service ability
826   * @param { ConnectOptions } options - The remote object instance
827   * @returns { number } Returns the number code of the ability connected
828   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
829   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
830   * @throws { BusinessError } 16000001 - The specified ability does not exist.
831   * @throws { BusinessError } 16000002 - Incorrect ability type.
832   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
833   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
834   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
835   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
836   * @throws { BusinessError } 16000011 - The context does not exist.
837   * @throws { BusinessError } 16000050 - Internal error.
838   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
839   * @throws { BusinessError } 16000055 - Installation-free timed out.
840   * @throws { BusinessError } 16000070 - The extension cannot start the service.
841   * @syscap SystemCapability.Ability.AbilityRuntime.Core
842   * @stagemodelonly
843   * @since 10
844   */
845  connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
846
847  /**
848   * Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
849   *
850   * @param { number } connection - The number code of the ability connected
851   * @param { AsyncCallback<void> } callback - The callback of disconnectAbility.
852   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
853   * @throws { BusinessError } 16000011 - The context does not exist.
854   * @throws { BusinessError } 16000050 - Internal error.
855   * @syscap SystemCapability.Ability.AbilityRuntime.Core
856   * @stagemodelonly
857   * @since 10
858   */
859  disconnectServiceExtensionAbility(connection: number, callback: AsyncCallback<void>): void;
860
861  /**
862   * Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
863   *
864   * @param { number } connection - The number code of the ability connected
865   * @returns { Promise<void> } The promise returned by the function.
866   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
867   * @throws { BusinessError } 16000011 - The context does not exist.
868   * @throws { BusinessError } 16000050 - Internal error.
869   * @syscap SystemCapability.Ability.AbilityRuntime.Core
870   * @stagemodelonly
871   * @since 10
872   */
873  disconnectServiceExtensionAbility(connection: number): Promise<void>;
874
875  /**
876   * Report to system when the extension is drawn completed.
877   *
878   * @param { AsyncCallback<void> } callback - The callback of startUIExtensionAbility.
879   * @throws { BusinessError } 16000011 - The context does not exist.
880   * @throws { BusinessError } 16000050 - Internal error.
881   * @syscap SystemCapability.Ability.AbilityRuntime.Core
882   * @stagemodelonly
883   * @since 12
884   */
885  reportDrawnCompleted(callback: AsyncCallback<void>): void;
886
887  /**
888   * Destroys the UI extension.
889   *
890   * @param { AsyncCallback<void> } callback - The callback of terminateSelf.
891   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
892   * @syscap SystemCapability.Ability.AbilityRuntime.Core
893   * @stagemodelonly
894   * @since arkts {'1.1':'12', '1.2':'20'}
895   * @arkts 1.1&1.2
896   */
897  terminateSelf(callback: AsyncCallback<void>): void;
898
899  /**
900   * Destroys the UI extension.
901   *
902   * @returns { Promise<void> } The promise returned by the function.
903   * @syscap SystemCapability.Ability.AbilityRuntime.Core
904   * @stagemodelonly
905   * @since arkts {'1.1':'12', '1.2':'20'}
906   * @arkts 1.1&1.2
907   */
908  terminateSelf(): Promise<void>;
909
910  /**
911   * Destroys the UI extension while returning the specified result code and data to the caller.
912   *
913   * @param { AbilityResult } parameter - Indicates the result to return.
914   * @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
915   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
916   * @syscap SystemCapability.Ability.AbilityRuntime.Core
917   * @stagemodelonly
918   * @since arkts {'1.1':'12', '1.2':'20'}
919   * @arkts 1.1&1.2
920   */
921  terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void;
922
923  /**
924   * Destroys the UI extension while returning the specified result code and data to the caller.
925   *
926   * @param { AbilityResult } parameter - Indicates the result to return.
927   * @returns { Promise<void> } The promise returned by the function.
928   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
929   * @syscap SystemCapability.Ability.AbilityRuntime.Core
930   * @stagemodelonly
931   * @since arkts {'1.1':'12', '1.2':'20'}
932   * @arkts 1.1&1.2
933   */
934  terminateSelfWithResult(parameter: AbilityResult): Promise<void>;
935
936  /**
937   * Full-screen pop-us startup atomic service.
938   *
939   * @param { string } appId - Globally unique identifier of an application, which is allocated by the cloud.
940   * @param { AtomicServiceOptions } [options] - Indicates the atomic service start options.
941   * @returns { Promise<AbilityResult> } Returns the result of openAtomicService.
942   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
943   * @throws { BusinessError } 16000002 - Incorrect ability type.
944   * @throws { BusinessError } 16000003 - The specified ID does not exist.
945   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
946   * @throws { BusinessError } 16000011 - The context does not exist.
947   * @throws { BusinessError } 16000012 - The application is controlled.
948   * @throws { BusinessError } 16000050 - Internal error.
949   * @throws { BusinessError } 16000069 - The extension cannot start the third party application.
950   * @throws { BusinessError } 16200001 - The caller has been released.
951   * @syscap SystemCapability.Ability.AbilityRuntime.Core
952   * @stagemodelonly
953   * @since 12
954   */
955  openAtomicService(appId: string, options?: AtomicServiceOptions): Promise<AbilityResult>;
956
957  /**
958   * Starts a UI service extension ability.
959   * If the target UI service extension ability is visible, you can start the target UI service extension ability;
960   * If the target UI service extension ability is invisible,
961   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UI service extension ability.
962   *
963   * @param { Want } want - Indicates the want info to start.
964   * @returns { Promise<void> } The promise returned by the function.
965   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
966   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
967   * 2. Incorrect parameter types; 3. Parameter verification failed.
968   * @throws { BusinessError } 801 - Capability not supported.
969   * @throws { BusinessError } 16000001 - The specified ability does not exist.
970   * @throws { BusinessError } 16000002 - Incorrect ability type.
971   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
972   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
973   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
974   * @throws { BusinessError } 16000011 - The context does not exist.
975   * @throws { BusinessError } 16000012 - The application is controlled.
976   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
977   * @throws { BusinessError } 16000019 - No matching ability is found.
978   * @throws { BusinessError } 16000050 - Internal error.
979   * @throws { BusinessError } 16200001 - The caller has been released.
980   * @syscap SystemCapability.Ability.AbilityRuntime.Core
981   * @stagemodelonly
982   * @since 14
983   */
984  startUIServiceExtensionAbility(want: Want): Promise<void>;
985
986  /**
987   * Connects to a UI service extension ability.
988   * If the target UI service extension ability is visible, you can connect the target UI service extension ability;
989   * If the target UI service extension ability is invisible,
990   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible UI service extension ability.
991   *
992   * @param { Want } want - Indicates the want info to connect.
993   * @param { UIServiceExtensionConnectCallback } callback - The callback of connection.
994   * @returns { Promise<UIServiceProxy> } The promise to get UIServiceProxy.
995   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
996   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
997   * 2. Incorrect parameter types; 3. Parameter verification failed.
998   * @throws { BusinessError } 801 - Capability not supported.
999   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1000   * @throws { BusinessError } 16000002 - Incorrect ability type.
1001   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
1002   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1003   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1004   * @throws { BusinessError } 16000011 - The context does not exist.
1005   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1006   * @throws { BusinessError } 16000050 - Internal error.
1007   * @throws { BusinessError } 16000055 - Installation-free timed out.
1008   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1009   * @stagemodelonly
1010   * @since 14
1011   */
1012  connectUIServiceExtensionAbility(want: Want, callback: UIServiceExtensionConnectCallback) : Promise<UIServiceProxy>;
1013
1014  /**
1015   * Disconnects from a UI service extension, in contrast to {@link connectUIServiceExtensionAbility}.
1016   *
1017   * @param { UIServiceProxy } proxy - The UI service proxy return by connectUIServiceExtensionAbility.
1018   * @returns { Promise<void> } The promise returned by the function.
1019   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
1020   * 2. Incorrect parameter types; 3. Parameter verification failed.
1021   * @throws { BusinessError } 16000011 - The context does not exist.
1022   * @throws { BusinessError } 16000050 - Internal error.
1023   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1024   * @stagemodelonly
1025   * @since 14
1026   */
1027  disconnectUIServiceExtensionAbility(proxy: UIServiceProxy): Promise<void>;
1028
1029  /**
1030   * Starts a new service extension ability.
1031   * If the target service extension ability is visible, you can start the target service extension ability;
1032   * If the target service extension ability is invisible,
1033   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
1034   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1035   *
1036   * @param { Want } want - Indicates the want info to start.
1037   * @returns { Promise<void> } The promise returned by the function.
1038   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1039   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1040   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1041   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1042   * @throws { BusinessError } 16000002 - Incorrect ability type.
1043   * @throws { BusinessError } 16000004 - Cannot start an invisible component.
1044   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1045   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1046   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
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 } 16000019 - No matching ability is found.
1051   * @throws { BusinessError } 16000050 - Internal error.
1052   * @throws { BusinessError } 16200001 - The caller has been released.
1053   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1054   * @systemapi
1055   * @stagemodelonly
1056   * @since 18
1057   */
1058  startServiceExtensionAbility(want: Want): Promise<void>;
1059
1060  /**
1061   * Starts a new service extension ability with account.
1062   * If the target service extension ability is visible, you can start the target service extension ability;
1063   * If the target service extension ability is invisible,
1064   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
1065   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
1066   *
1067   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
1068   * @param { Want } want - Indicates the want info to start.
1069   * @param { number } accountId - Indicates the account to start.
1070   * @returns { Promise<void> } The promise returned by the function.
1071   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1072   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1073   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1074   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1075   * @throws { BusinessError } 16000002 - Incorrect ability type.
1076   * @throws { BusinessError } 16000004 - Cannot start an 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 } 16000011 - The context does not exist.
1081   * @throws { BusinessError } 16000012 - The application is controlled.
1082   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
1083   * @throws { BusinessError } 16000019 - No matching ability is found.
1084   * @throws { BusinessError } 16000050 - Internal error.
1085   * @throws { BusinessError } 16200001 - The caller has been released.
1086   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1087   * @systemapi
1088   * @stagemodelonly
1089   * @since 18
1090   */
1091  startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>;
1092
1093  /**
1094   * Set the uiextension to either not allow being covered by the host page or allow it.
1095   *
1096   * @param { boolean } isForbidden - Indicates the bool value of uiextension can be covered by host page.
1097   *                                  True indicates not allowing.
1098   *                                  False indicates allowing.
1099   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
1100   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
1101   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1102   * @systemapi
1103   * @stagemodelonly
1104   * @since 15
1105   */
1106  setHostPageOverlayForbidden(isForbidden: boolean) : void;
1107
1108  /**
1109   * Set colorMode of uiextension.
1110   *
1111   * @param { ConfigurationConstant.ColorMode } colorMode - Color mode.
1112   * @throws { BusinessError } 16000011 - The context does not exist.
1113   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1114   * @stagemodelonly
1115   * @since 18
1116   */
1117   setColorMode(colorMode: ConfigurationConstant.ColorMode): void;
1118
1119  /**
1120   * Starts multi UIAbility simultaneously. If the caller application is in foreground, you can use
1121   * this method to start abilities; If the caller application is in the background, you need to apply
1122   * for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND. If the target ability is visible,
1123   * you can start the target ability; If the target ability is invisible,you need to apply for
1124   * permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
1125   *
1126   * @param { Array<Want> } wantList - Indicates the want info list to start.
1127   * @returns { Promise<void> } The promise returned by the function.
1128   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
1129   * @throws { BusinessError } 202 - Not system application.
1130   * @throws { BusinessError } 801 - Capability not supported.
1131   * @throws { BusinessError } 16000001 - The specified ability does not exist.
1132   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
1133   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
1134   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
1135   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
1136   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
1137   * @throws { BusinessError } 16000011 - The context does not exist.
1138   * @throws { BusinessError } 16000050 - Internal error.
1139   * @throws { BusinessError } 16200001 - The caller has been released.
1140   * @throws { BusinessError } 16000073 - The app clone index is invalid.
1141   * @throws { BusinessError } 16000076 - The app instance key is invalid.
1142   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
1143   * @throws { BusinessError } 16000120 - A maximum of four UIAbility instances can be started simultaneously.
1144   *                                      The current parameter exceeds the maximum number or is less than 1.
1145   * @throws { BusinessError } 16000121 - The target component type is not a UIAbility.
1146   * @throws { BusinessError } 16000122 - The target component is blocked by the system module and
1147   *                                      does not support startup.
1148   * @throws { BusinessError } 16000123 - Implicit startup is not supported.
1149   * @throws { BusinessError } 16000124 - Starting a remote UIAbility is not supported.
1150   * @throws { BusinessError } 16000125 - Starting a plugin UIAbility is not supported.
1151   * @throws { BusinessError } 16000126 - Starting DLP files is not supported.
1152   * @syscap SystemCapability.Ability.AbilityRuntime.Core
1153   * @systemapi
1154   * @stagemodelonly
1155   * @since 20
1156   */
1157  startUIAbilities(wantList: Array<Want>): Promise<void>;
1158}
1159
1160export default UIExtensionContext;