161847f8eSopenharmony_ci/*
261847f8eSopenharmony_ci * Copyright (c) 2022-2024 Huawei Device Co., Ltd.
361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"),
461847f8eSopenharmony_ci * you may not use this file except in compliance with the License.
561847f8eSopenharmony_ci * You may obtain a copy of the License at
661847f8eSopenharmony_ci *
761847f8eSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
861847f8eSopenharmony_ci *
961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and
1361847f8eSopenharmony_ci * limitations under the License.
1461847f8eSopenharmony_ci */
1561847f8eSopenharmony_ci
1661847f8eSopenharmony_ci/**
1761847f8eSopenharmony_ci * @file
1861847f8eSopenharmony_ci * @kit AbilityKit
1961847f8eSopenharmony_ci */
2061847f8eSopenharmony_ci
2161847f8eSopenharmony_ciimport { AsyncCallback } from '../@ohos.base';
2261847f8eSopenharmony_ciimport { ConnectOptions } from '../ability/connectOptions';
2361847f8eSopenharmony_ciimport { Caller } from '../@ohos.app.ability.UIAbility';
2461847f8eSopenharmony_ciimport ExtensionContext from './ExtensionContext';
2561847f8eSopenharmony_ciimport Want from '../@ohos.app.ability.Want';
2661847f8eSopenharmony_ciimport StartOptions from '../@ohos.app.ability.StartOptions';
2761847f8eSopenharmony_ciimport OpenLinkOptions from '../@ohos.app.ability.OpenLinkOptions';
2861847f8eSopenharmony_ci
2961847f8eSopenharmony_ci/**
3061847f8eSopenharmony_ci * The context of service extension. It allows access to
3161847f8eSopenharmony_ci * serviceExtension-specific resources.
3261847f8eSopenharmony_ci *
3361847f8eSopenharmony_ci * @extends ExtensionContext
3461847f8eSopenharmony_ci * @syscap SystemCapability.Ability.AbilityRuntime.Core
3561847f8eSopenharmony_ci * @systemapi
3661847f8eSopenharmony_ci * @stagemodelonly
3761847f8eSopenharmony_ci * @since 9
3861847f8eSopenharmony_ci */
3961847f8eSopenharmony_ciexport default class ServiceExtensionContext extends ExtensionContext {
4061847f8eSopenharmony_ci  /**
4161847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability.
4261847f8eSopenharmony_ci   *
4361847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
4461847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
4561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
4661847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
4761847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
4861847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
4961847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
5061847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
5161847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
5261847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
5361847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
5461847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
5561847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
5661847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
5761847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
5861847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
5961847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
6061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
6161847f8eSopenharmony_ci   * @systemapi
6261847f8eSopenharmony_ci   * @stagemodelonly
6361847f8eSopenharmony_ci   * @since 9
6461847f8eSopenharmony_ci   */
6561847f8eSopenharmony_ci  /**
6661847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability. If the caller application is in foreground,
6761847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
6861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
6961847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
7061847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
7161847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
7261847f8eSopenharmony_ci   *
7361847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
7461847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
7561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
7661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
7761847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
7861847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
7961847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
8061847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
8161847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
8261847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
8361847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
8461847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
8561847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
8661847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
8761847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
8861847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
8961847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
9061847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
9161847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
9261847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
9361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
9461847f8eSopenharmony_ci   * @systemapi
9561847f8eSopenharmony_ci   * @stagemodelonly
9661847f8eSopenharmony_ci   * @since 10
9761847f8eSopenharmony_ci   */
9861847f8eSopenharmony_ci  /**
9961847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability. If the caller application is in foreground,
10061847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
10161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
10261847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
10361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
10461847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
10561847f8eSopenharmony_ci   *
10661847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
10761847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
10861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
10961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
11061847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
11161847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
11261847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
11361847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
11461847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
11561847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
11661847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
11761847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
11861847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
11961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
12061847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
12161847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
12261847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - Can not match any component.
12361847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
12461847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
12561847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
12661847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
12761847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
12861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
12961847f8eSopenharmony_ci   * @systemapi
13061847f8eSopenharmony_ci   * @stagemodelonly
13161847f8eSopenharmony_ci   * @since 12
13261847f8eSopenharmony_ci   */
13361847f8eSopenharmony_ci  /**
13461847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability. If the caller application is in foreground,
13561847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
13661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
13761847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
13861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
13961847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
14061847f8eSopenharmony_ci   *
14161847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
14261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
14361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
14461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
14561847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
14661847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
14761847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
14861847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
14961847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
15061847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
15161847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
15261847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
15361847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
15461847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
15561847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
15661847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
15761847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
15861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
15961847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
16061847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
16161847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
16261847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
16361847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
16461847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
16561847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
16661847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
16761847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
16861847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
16961847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
17061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
17161847f8eSopenharmony_ci   * @systemapi
17261847f8eSopenharmony_ci   * @stagemodelonly
17361847f8eSopenharmony_ci   * @since 14
17461847f8eSopenharmony_ci   */
17561847f8eSopenharmony_ci  startAbility(want: Want, callback: AsyncCallback<void>): void;
17661847f8eSopenharmony_ci
17761847f8eSopenharmony_ci  /**
17861847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability.
17961847f8eSopenharmony_ci   *
18061847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
18161847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
18261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
18361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
18461847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
18561847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
18661847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
18761847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
18861847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
18961847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
19061847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
19161847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
19261847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
19361847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
19461847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
19561847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
19661847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
19761847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
19861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
19961847f8eSopenharmony_ci   * @systemapi
20061847f8eSopenharmony_ci   * @stagemodelonly
20161847f8eSopenharmony_ci   * @since 9
20261847f8eSopenharmony_ci   */
20361847f8eSopenharmony_ci  /**
20461847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability. If the caller application is in foreground,
20561847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
20661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
20761847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
20861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
20961847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
21061847f8eSopenharmony_ci   *
21161847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
21261847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
21361847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
21461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
21561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
21661847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
21761847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
21861847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
21961847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
22061847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
22161847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
22261847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
22361847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
22461847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
22561847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
22661847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
22761847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
22861847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
22961847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
23061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
23161847f8eSopenharmony_ci   * @systemapi
23261847f8eSopenharmony_ci   * @stagemodelonly
23361847f8eSopenharmony_ci   * @since 10
23461847f8eSopenharmony_ci   */
23561847f8eSopenharmony_ci  /**
23661847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability. If the caller application is in foreground,
23761847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
23861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
23961847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
24061847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
24161847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
24261847f8eSopenharmony_ci   *
24361847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
24461847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
24561847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
24661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
24761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
24861847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
24961847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
25061847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
25161847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
25261847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
25361847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
25461847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
25561847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
25661847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
25761847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
25861847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - Can not match any component.
25961847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
26061847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
26161847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
26261847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
26361847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
26461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
26561847f8eSopenharmony_ci   * @systemapi
26661847f8eSopenharmony_ci   * @stagemodelonly
26761847f8eSopenharmony_ci   * @since 12
26861847f8eSopenharmony_ci   */
26961847f8eSopenharmony_ci  /**
27061847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability. If the caller application is in foreground,
27161847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
27261847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
27361847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
27461847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
27561847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
27661847f8eSopenharmony_ci   *
27761847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
27861847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
27961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
28061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
28161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
28261847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
28361847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
28461847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
28561847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
28661847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
28761847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
28861847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
28961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
29061847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
29161847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
29261847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
29361847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
29461847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
29561847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
29661847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
29761847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
29861847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
29961847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
30061847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
30161847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
30261847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
30361847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
30461847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
30561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
30661847f8eSopenharmony_ci   * @systemapi
30761847f8eSopenharmony_ci   * @stagemodelonly
30861847f8eSopenharmony_ci   * @since 14
30961847f8eSopenharmony_ci   */
31061847f8eSopenharmony_ci  startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
31161847f8eSopenharmony_ci
31261847f8eSopenharmony_ci  /**
31361847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability.
31461847f8eSopenharmony_ci   *
31561847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
31661847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
31761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
31861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
31961847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
32061847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
32161847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
32261847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
32361847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
32461847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
32561847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
32661847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
32761847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
32861847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
32961847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
33061847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
33161847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
33261847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
33361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
33461847f8eSopenharmony_ci   * @systemapi
33561847f8eSopenharmony_ci   * @stagemodelonly
33661847f8eSopenharmony_ci   * @since 9
33761847f8eSopenharmony_ci   */
33861847f8eSopenharmony_ci  /**
33961847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability. If the caller application is in foreground,
34061847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
34161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
34261847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
34361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
34461847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
34561847f8eSopenharmony_ci   *
34661847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
34761847f8eSopenharmony_ci   * @param { StartOptions } [options] - Indicates the start options.
34861847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
34961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
35061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
35161847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
35261847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
35361847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
35461847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
35561847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
35661847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
35761847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
35861847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
35961847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
36061847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
36161847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
36261847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
36361847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
36461847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
36561847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
36661847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
36761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
36861847f8eSopenharmony_ci   * @systemapi
36961847f8eSopenharmony_ci   * @stagemodelonly
37061847f8eSopenharmony_ci   * @since 10
37161847f8eSopenharmony_ci   */
37261847f8eSopenharmony_ci  /**
37361847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability. If the caller application is in foreground,
37461847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
37561847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
37661847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
37761847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
37861847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
37961847f8eSopenharmony_ci   *
38061847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
38161847f8eSopenharmony_ci   * @param { StartOptions } [options] - Indicates the start options.
38261847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
38361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
38461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
38561847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
38661847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
38761847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
38861847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
38961847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
39061847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
39161847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
39261847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
39361847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
39461847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
39561847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
39661847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
39761847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - Can not match any component.
39861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
39961847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
40061847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
40161847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
40261847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
40361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
40461847f8eSopenharmony_ci   * @systemapi
40561847f8eSopenharmony_ci   * @stagemodelonly
40661847f8eSopenharmony_ci   * @since 12
40761847f8eSopenharmony_ci   */
40861847f8eSopenharmony_ci  /**
40961847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability. If the caller application is in foreground,
41061847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
41161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
41261847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
41361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
41461847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
41561847f8eSopenharmony_ci   *
41661847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
41761847f8eSopenharmony_ci   * @param { StartOptions } [options] - Indicates the start options.
41861847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
41961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
42061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
42161847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
42261847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
42361847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
42461847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
42561847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
42661847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
42761847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
42861847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
42961847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
43061847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
43161847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
43261847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
43361847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
43461847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
43561847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
43661847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
43761847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
43861847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
43961847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
44061847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
44161847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
44261847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
44361847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
44461847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
44561847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
44661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
44761847f8eSopenharmony_ci   * @systemapi
44861847f8eSopenharmony_ci   * @stagemodelonly
44961847f8eSopenharmony_ci   * @since 14
45061847f8eSopenharmony_ci   */
45161847f8eSopenharmony_ci  startAbility(want: Want, options?: StartOptions): Promise<void>;
45261847f8eSopenharmony_ci
45361847f8eSopenharmony_ci  /**
45461847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability by implicit want. If the caller application is in foreground,
45561847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
45661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
45761847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
45861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
45961847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
46061847f8eSopenharmony_ci   *
46161847f8eSopenharmony_ci   * @param { string } link - Indicates the ability to start.
46261847f8eSopenharmony_ci   * @param { OpenLinkOptions } [options] - Indicates the open link options.
46361847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
46461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
46561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
46661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
46761847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
46861847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
46961847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
47061847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
47161847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
47261847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
47361847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
47461847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
47561847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
47661847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
47761847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
47861847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
47961847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
48061847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
48161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
48261847f8eSopenharmony_ci   * @systemapi
48361847f8eSopenharmony_ci   * @stagemodelonly
48461847f8eSopenharmony_ci   * @since 12
48561847f8eSopenharmony_ci   */
48661847f8eSopenharmony_ci  openLink(link: string, options?: OpenLinkOptions): Promise<void>;
48761847f8eSopenharmony_ci
48861847f8eSopenharmony_ci  /**
48961847f8eSopenharmony_ci   * Service extension start an ability using the original caller information. If the caller application is in
49061847f8eSopenharmony_ci   * foreground, you can use this method to start ability; If the caller application is in the background,
49161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
49261847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
49361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
49461847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
49561847f8eSopenharmony_ci   *
49661847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
49761847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
49861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
49961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
50061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
50161847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
50261847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
50361847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
50461847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
50561847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
50661847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
50761847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
50861847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
50961847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
51061847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
51161847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
51261847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
51361847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
51461847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
51561847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
51661847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
51761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
51861847f8eSopenharmony_ci   * @systemapi
51961847f8eSopenharmony_ci   * @stagemodelonly
52061847f8eSopenharmony_ci   * @since 10
52161847f8eSopenharmony_ci   */
52261847f8eSopenharmony_ci  /**
52361847f8eSopenharmony_ci   * Service extension start an ability using the original caller information. If the caller application is in
52461847f8eSopenharmony_ci   * foreground, you can use this method to start ability; If the caller application is in the background,
52561847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
52661847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
52761847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
52861847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
52961847f8eSopenharmony_ci   *
53061847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
53161847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
53261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
53361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
53461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
53561847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
53661847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
53761847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
53861847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
53961847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
54061847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
54161847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
54261847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
54361847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
54461847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
54561847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
54661847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
54761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
54861847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
54961847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
55061847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
55161847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
55261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
55361847f8eSopenharmony_ci   * @systemapi
55461847f8eSopenharmony_ci   * @stagemodelonly
55561847f8eSopenharmony_ci   * @since 12
55661847f8eSopenharmony_ci   */
55761847f8eSopenharmony_ci  /**
55861847f8eSopenharmony_ci   * Service extension start an ability using the original caller information. If the caller application is in
55961847f8eSopenharmony_ci   * foreground, you can use this method to start ability; If the caller application is in the background,
56061847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
56161847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
56261847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
56361847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
56461847f8eSopenharmony_ci   *
56561847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
56661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
56761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
56861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
56961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
57061847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
57161847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
57261847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
57361847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
57461847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
57561847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
57661847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
57761847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
57861847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
57961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
58061847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
58161847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
58261847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
58361847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
58461847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
58561847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
58661847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
58761847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
58861847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
58961847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
59061847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
59161847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
59261847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
59361847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
59461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
59561847f8eSopenharmony_ci   * @systemapi
59661847f8eSopenharmony_ci   * @stagemodelonly
59761847f8eSopenharmony_ci   * @since 14
59861847f8eSopenharmony_ci   */
59961847f8eSopenharmony_ci  startAbilityAsCaller(want: Want, callback: AsyncCallback<void>): void;
60061847f8eSopenharmony_ci
60161847f8eSopenharmony_ci  /**
60261847f8eSopenharmony_ci   * Service extension start an ability using the original caller information. If the caller application is in
60361847f8eSopenharmony_ci   * foreground, you can use this method to start ability; If the caller application is in the background,
60461847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
60561847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
60661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
60761847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
60861847f8eSopenharmony_ci   *
60961847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
61061847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
61161847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
61261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
61361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
61461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
61561847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
61661847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
61761847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
61861847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
61961847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
62061847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
62161847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
62261847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
62361847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
62461847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
62561847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
62661847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
62761847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
62861847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
62961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
63061847f8eSopenharmony_ci   * @systemapi
63161847f8eSopenharmony_ci   * @stagemodelonly
63261847f8eSopenharmony_ci   * @since 10
63361847f8eSopenharmony_ci   */
63461847f8eSopenharmony_ci  /**
63561847f8eSopenharmony_ci   * Service extension start an ability using the original caller information. If the caller application is in
63661847f8eSopenharmony_ci   * foreground, you can use this method to start ability; If the caller application is in the background,
63761847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
63861847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
63961847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
64061847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
64161847f8eSopenharmony_ci   *
64261847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
64361847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
64461847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
64561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
64661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
64761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
64861847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
64961847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
65061847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
65161847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
65261847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
65361847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
65461847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
65561847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
65661847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
65761847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
65861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
65961847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
66061847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
66161847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
66261847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
66361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
66461847f8eSopenharmony_ci   * @systemapi
66561847f8eSopenharmony_ci   * @stagemodelonly
66661847f8eSopenharmony_ci   * @since 12
66761847f8eSopenharmony_ci   */
66861847f8eSopenharmony_ci  /**
66961847f8eSopenharmony_ci   * Service extension start an ability using the original caller information. If the caller application is in
67061847f8eSopenharmony_ci   * foreground, you can use this method to start ability; If the caller application is in the background,
67161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
67261847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
67361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
67461847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
67561847f8eSopenharmony_ci   *
67661847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
67761847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
67861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
67961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
68061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
68161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
68261847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
68361847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
68461847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
68561847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
68661847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
68761847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
68861847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
68961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
69061847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
69161847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
69261847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
69361847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
69461847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
69561847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
69661847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
69761847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
69861847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
69961847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
70061847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
70161847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
70261847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
70361847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
70461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
70561847f8eSopenharmony_ci   * @systemapi
70661847f8eSopenharmony_ci   * @stagemodelonly
70761847f8eSopenharmony_ci   * @since 14
70861847f8eSopenharmony_ci   */
70961847f8eSopenharmony_ci  startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
71061847f8eSopenharmony_ci
71161847f8eSopenharmony_ci  /**
71261847f8eSopenharmony_ci   * Service extension start an ability using the original caller information. If the caller application is in
71361847f8eSopenharmony_ci   * foreground, you can use this method to start ability; If the caller application is in the background,
71461847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
71561847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
71661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
71761847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
71861847f8eSopenharmony_ci   *
71961847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
72061847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
72161847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
72261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
72361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
72461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
72561847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
72661847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
72761847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
72861847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
72961847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
73061847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
73161847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
73261847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
73361847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
73461847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
73561847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
73661847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
73761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
73861847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
73961847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
74061847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
74161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
74261847f8eSopenharmony_ci   * @systemapi
74361847f8eSopenharmony_ci   * @stagemodelonly
74461847f8eSopenharmony_ci   * @since 10
74561847f8eSopenharmony_ci   */
74661847f8eSopenharmony_ci  /**
74761847f8eSopenharmony_ci   * Service extension start an ability using the original caller information. If the caller application is in
74861847f8eSopenharmony_ci   * foreground, you can use this method to start ability; If the caller application is in the background,
74961847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
75061847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
75161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
75261847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
75361847f8eSopenharmony_ci   *
75461847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
75561847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
75661847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
75761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
75861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
75961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
76061847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
76161847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
76261847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
76361847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
76461847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
76561847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
76661847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
76761847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
76861847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
76961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
77061847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
77161847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
77261847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
77361847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
77461847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
77561847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
77661847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
77761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
77861847f8eSopenharmony_ci   * @systemapi
77961847f8eSopenharmony_ci   * @stagemodelonly
78061847f8eSopenharmony_ci   * @since 12
78161847f8eSopenharmony_ci   */
78261847f8eSopenharmony_ci  /**
78361847f8eSopenharmony_ci   * Service extension start an ability using the original caller information. If the caller application is in
78461847f8eSopenharmony_ci   * foreground, you can use this method to start ability; If the caller application is in the background,
78561847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
78661847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
78761847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
78861847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
78961847f8eSopenharmony_ci   *
79061847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
79161847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
79261847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
79361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
79461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
79561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
79661847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
79761847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
79861847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
79961847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
80061847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
80161847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
80261847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
80361847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
80461847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
80561847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
80661847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
80761847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
80861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
80961847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
81061847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
81161847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
81261847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
81361847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
81461847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
81561847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
81661847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
81761847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
81861847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
81961847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
82061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
82161847f8eSopenharmony_ci   * @systemapi
82261847f8eSopenharmony_ci   * @stagemodelonly
82361847f8eSopenharmony_ci   * @since 14
82461847f8eSopenharmony_ci   */
82561847f8eSopenharmony_ci  startAbilityAsCaller(want: Want, options?: StartOptions): Promise<void>;
82661847f8eSopenharmony_ci
82761847f8eSopenharmony_ci  /**
82861847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability with account. If the caller application is in foreground,
82961847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
83061847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
83161847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
83261847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
83361847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
83461847f8eSopenharmony_ci   *
83561847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
83661847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
83761847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
83861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
83961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
84061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
84161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
84261847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
84361847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
84461847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
84561847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
84661847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
84761847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
84861847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
84961847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
85061847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
85161847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
85261847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
85361847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
85461847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
85561847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
85661847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
85761847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
85861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
85961847f8eSopenharmony_ci   * @systemapi
86061847f8eSopenharmony_ci   * @stagemodelonly
86161847f8eSopenharmony_ci   * @since 9
86261847f8eSopenharmony_ci   */
86361847f8eSopenharmony_ci  /**
86461847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability with account. If the caller application is in foreground,
86561847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
86661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
86761847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
86861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
86961847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
87061847f8eSopenharmony_ci   *
87161847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
87261847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
87361847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
87461847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
87561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
87661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
87761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
87861847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
87961847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
88061847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
88161847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
88261847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
88361847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
88461847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
88561847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
88661847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
88761847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
88861847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
88961847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
89061847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - Can not match any component.
89161847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
89261847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
89361847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
89461847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
89561847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
89661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
89761847f8eSopenharmony_ci   * @systemapi
89861847f8eSopenharmony_ci   * @stagemodelonly
89961847f8eSopenharmony_ci   * @since 12
90061847f8eSopenharmony_ci   */
90161847f8eSopenharmony_ci  /**
90261847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability with account. If the caller application is in foreground,
90361847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
90461847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
90561847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
90661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
90761847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
90861847f8eSopenharmony_ci   *
90961847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
91061847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
91161847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
91261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
91361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
91461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
91561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
91661847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
91761847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
91861847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
91961847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
92061847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
92161847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
92261847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
92361847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
92461847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
92561847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
92661847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
92761847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
92861847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
92961847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
93061847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
93161847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
93261847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
93361847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
93461847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
93561847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
93661847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
93761847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
93861847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
93961847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
94061847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
94161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
94261847f8eSopenharmony_ci   * @systemapi
94361847f8eSopenharmony_ci   * @stagemodelonly
94461847f8eSopenharmony_ci   * @since 14
94561847f8eSopenharmony_ci   */
94661847f8eSopenharmony_ci  startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
94761847f8eSopenharmony_ci
94861847f8eSopenharmony_ci  /**
94961847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability with account.
95061847f8eSopenharmony_ci   *
95161847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
95261847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
95361847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
95461847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
95561847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
95661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
95761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
95861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
95961847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
96061847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
96161847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
96261847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
96361847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
96461847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
96561847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
96661847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
96761847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
96861847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
96961847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
97061847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
97161847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
97261847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
97361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
97461847f8eSopenharmony_ci   * @systemapi
97561847f8eSopenharmony_ci   * @stagemodelonly
97661847f8eSopenharmony_ci   * @since 9
97761847f8eSopenharmony_ci   */
97861847f8eSopenharmony_ci  /**
97961847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability with account. If the caller application is in foreground,
98061847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
98161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
98261847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
98361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
98461847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
98561847f8eSopenharmony_ci   *
98661847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
98761847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
98861847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
98961847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
99061847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
99161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
99261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
99361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
99461847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
99561847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
99661847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
99761847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
99861847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
99961847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
100061847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
100161847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
100261847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
100361847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
100461847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
100561847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
100661847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
100761847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
100861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
100961847f8eSopenharmony_ci   * @systemapi
101061847f8eSopenharmony_ci   * @stagemodelonly
101161847f8eSopenharmony_ci   * @since 10
101261847f8eSopenharmony_ci   */
101361847f8eSopenharmony_ci  /**
101461847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability with account. If the caller application is in foreground,
101561847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
101661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
101761847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
101861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
101961847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
102061847f8eSopenharmony_ci   *
102161847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
102261847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
102361847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
102461847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
102561847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
102661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
102761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
102861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
102961847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
103061847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
103161847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
103261847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
103361847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
103461847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
103561847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
103661847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
103761847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
103861847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
103961847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - Can not match any component.
104061847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
104161847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
104261847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
104361847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
104461847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
104561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
104661847f8eSopenharmony_ci   * @systemapi
104761847f8eSopenharmony_ci   * @stagemodelonly
104861847f8eSopenharmony_ci   * @since 12
104961847f8eSopenharmony_ci   */
105061847f8eSopenharmony_ci  /**
105161847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability with account. If the caller application is in foreground,
105261847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
105361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
105461847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
105561847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
105661847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
105761847f8eSopenharmony_ci   *
105861847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
105961847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
106061847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
106161847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
106261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
106361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
106461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
106561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
106661847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
106761847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
106861847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
106961847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
107061847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
107161847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
107261847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
107361847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
107461847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
107561847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
107661847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
107761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
107861847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
107961847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
108061847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
108161847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
108261847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
108361847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
108461847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
108561847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
108661847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
108761847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
108861847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
108961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
109061847f8eSopenharmony_ci   * @systemapi
109161847f8eSopenharmony_ci   * @stagemodelonly
109261847f8eSopenharmony_ci   * @since 14
109361847f8eSopenharmony_ci   */
109461847f8eSopenharmony_ci  startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback<void>): void;
109561847f8eSopenharmony_ci
109661847f8eSopenharmony_ci  /**
109761847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability with account. If the caller application is in foreground,
109861847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
109961847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
110061847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
110161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
110261847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
110361847f8eSopenharmony_ci   *
110461847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
110561847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
110661847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
110761847f8eSopenharmony_ci   * @param { StartOptions } [options] - Indicates the start options.
110861847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
110961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
111061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
111161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
111261847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
111361847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
111461847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
111561847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
111661847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
111761847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
111861847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
111961847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
112061847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
112161847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
112261847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
112361847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
112461847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
112561847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
112661847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
112761847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
112861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
112961847f8eSopenharmony_ci   * @systemapi
113061847f8eSopenharmony_ci   * @stagemodelonly
113161847f8eSopenharmony_ci   * @since 9
113261847f8eSopenharmony_ci   */
113361847f8eSopenharmony_ci  /**
113461847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability with account. If the caller application is in foreground,
113561847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
113661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
113761847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
113861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
113961847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
114061847f8eSopenharmony_ci   *
114161847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
114261847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
114361847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
114461847f8eSopenharmony_ci   * @param { StartOptions } [options] - Indicates the start options.
114561847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
114661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
114761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
114861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
114961847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
115061847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
115161847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
115261847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
115361847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
115461847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
115561847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
115661847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
115761847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
115861847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
115961847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
116061847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
116161847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - Can not match any component.
116261847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
116361847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
116461847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
116561847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
116661847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
116761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
116861847f8eSopenharmony_ci   * @systemapi
116961847f8eSopenharmony_ci   * @stagemodelonly
117061847f8eSopenharmony_ci   * @since 12
117161847f8eSopenharmony_ci   */
117261847f8eSopenharmony_ci  /**
117361847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability with account. If the caller application is in foreground,
117461847f8eSopenharmony_ci   * you can use this method to start ability; If the caller application is in the background,
117561847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
117661847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
117761847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
117861847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
117961847f8eSopenharmony_ci   *
118061847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
118161847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
118261847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
118361847f8eSopenharmony_ci   * @param { StartOptions } [options] - Indicates the start options.
118461847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
118561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
118661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
118761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
118861847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
118961847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
119061847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
119161847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
119261847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
119361847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
119461847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
119561847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
119661847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
119761847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
119861847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
119961847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
120061847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
120161847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
120261847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
120361847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
120461847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
120561847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
120661847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
120761847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
120861847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
120961847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
121061847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
121161847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
121261847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
121361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
121461847f8eSopenharmony_ci   * @systemapi
121561847f8eSopenharmony_ci   * @stagemodelonly
121661847f8eSopenharmony_ci   * @since 14
121761847f8eSopenharmony_ci   */
121861847f8eSopenharmony_ci  startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise<void>;
121961847f8eSopenharmony_ci
122061847f8eSopenharmony_ci  /**
122161847f8eSopenharmony_ci   * Starts a new service extension ability.
122261847f8eSopenharmony_ci   *
122361847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
122461847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
122561847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
122661847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
122761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
122861847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
122961847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
123061847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
123161847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
123261847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
123361847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
123461847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
123561847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
123661847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
123761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
123861847f8eSopenharmony_ci   * @systemapi
123961847f8eSopenharmony_ci   * @stagemodelonly
124061847f8eSopenharmony_ci   * @since 9
124161847f8eSopenharmony_ci   */
124261847f8eSopenharmony_ci  /**
124361847f8eSopenharmony_ci   * Starts a new service extension ability.
124461847f8eSopenharmony_ci   * If the target service extension ability is visible, you can start the target service extension ability;
124561847f8eSopenharmony_ci   * If the target service extension ability is invisible,
124661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
124761847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
124861847f8eSopenharmony_ci   *
124961847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
125061847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
125161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
125261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
125361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
125461847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
125561847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
125661847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
125761847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
125861847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
125961847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
126061847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
126161847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
126261847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
126361847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
126461847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
126561847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
126661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
126761847f8eSopenharmony_ci   * @systemapi
126861847f8eSopenharmony_ci   * @stagemodelonly
126961847f8eSopenharmony_ci   * @since 10
127061847f8eSopenharmony_ci   */
127161847f8eSopenharmony_ci  /**
127261847f8eSopenharmony_ci   * Starts a new service extension ability.
127361847f8eSopenharmony_ci   * If the target service extension ability is visible, you can start the target service extension ability;
127461847f8eSopenharmony_ci   * If the target service extension ability is invisible,
127561847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
127661847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
127761847f8eSopenharmony_ci   *
127861847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
127961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
128061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
128161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
128261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
128361847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
128461847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
128561847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
128661847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
128761847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
128861847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
128961847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
129061847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
129161847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
129261847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
129361847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
129461847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
129561847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
129661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
129761847f8eSopenharmony_ci   * @systemapi
129861847f8eSopenharmony_ci   * @stagemodelonly
129961847f8eSopenharmony_ci   * @since 12
130061847f8eSopenharmony_ci   */
130161847f8eSopenharmony_ci  startServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void;
130261847f8eSopenharmony_ci
130361847f8eSopenharmony_ci  /**
130461847f8eSopenharmony_ci   * Starts a new service extension ability.
130561847f8eSopenharmony_ci   *
130661847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
130761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
130861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
130961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
131061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
131161847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
131261847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
131361847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
131461847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
131561847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
131661847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
131761847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
131861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
131961847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
132061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
132161847f8eSopenharmony_ci   * @systemapi
132261847f8eSopenharmony_ci   * @stagemodelonly
132361847f8eSopenharmony_ci   * @since 9
132461847f8eSopenharmony_ci   */
132561847f8eSopenharmony_ci  /**
132661847f8eSopenharmony_ci   * Starts a new service extension ability.
132761847f8eSopenharmony_ci   * If the target service extension ability is visible, you can start the target service extension ability;
132861847f8eSopenharmony_ci   * If the target service extension ability is invisible,
132961847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
133061847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
133161847f8eSopenharmony_ci   *
133261847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
133361847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
133461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
133561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
133661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
133761847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
133861847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
133961847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
134061847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
134161847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
134261847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
134361847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
134461847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
134561847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
134661847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
134761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
134861847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
134961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
135061847f8eSopenharmony_ci   * @systemapi
135161847f8eSopenharmony_ci   * @stagemodelonly
135261847f8eSopenharmony_ci   * @since 10
135361847f8eSopenharmony_ci   */
135461847f8eSopenharmony_ci  /**
135561847f8eSopenharmony_ci   * Starts a new service extension ability.
135661847f8eSopenharmony_ci   * If the target service extension ability is visible, you can start the target service extension ability;
135761847f8eSopenharmony_ci   * If the target service extension ability is invisible,
135861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
135961847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
136061847f8eSopenharmony_ci   *
136161847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
136261847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
136361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
136461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
136561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
136661847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
136761847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
136861847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
136961847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
137061847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
137161847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
137261847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
137361847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
137461847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
137561847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
137661847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
137761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
137861847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
137961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
138061847f8eSopenharmony_ci   * @systemapi
138161847f8eSopenharmony_ci   * @stagemodelonly
138261847f8eSopenharmony_ci   * @since 12
138361847f8eSopenharmony_ci   */
138461847f8eSopenharmony_ci  startServiceExtensionAbility(want: Want): Promise<void>;
138561847f8eSopenharmony_ci
138661847f8eSopenharmony_ci  /**
138761847f8eSopenharmony_ci   * Starts a new service extension ability with account.
138861847f8eSopenharmony_ci   *
138961847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
139061847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
139161847f8eSopenharmony_ci   * @param { number } accountId - Indicates the account to start.
139261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
139361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
139461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
139561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
139661847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
139761847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
139861847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
139961847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
140061847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
140161847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
140261847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
140361847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
140461847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
140561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
140661847f8eSopenharmony_ci   * @systemapi
140761847f8eSopenharmony_ci   * @stagemodelonly
140861847f8eSopenharmony_ci   * @since 9
140961847f8eSopenharmony_ci   */
141061847f8eSopenharmony_ci  /**
141161847f8eSopenharmony_ci   * Starts a new service extension ability with account.
141261847f8eSopenharmony_ci   * If the target service extension ability is visible, you can start the target service extension ability;
141361847f8eSopenharmony_ci   * If the target service extension ability is invisible,
141461847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
141561847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
141661847f8eSopenharmony_ci   *
141761847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
141861847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
141961847f8eSopenharmony_ci   * @param { number } accountId - Indicates the account to start.
142061847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
142161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
142261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
142361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
142461847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
142561847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
142661847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
142761847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
142861847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
142961847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
143061847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
143161847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
143261847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
143361847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
143461847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
143561847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
143661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
143761847f8eSopenharmony_ci   * @systemapi
143861847f8eSopenharmony_ci   * @stagemodelonly
143961847f8eSopenharmony_ci   * @since 10
144061847f8eSopenharmony_ci   */
144161847f8eSopenharmony_ci  /**
144261847f8eSopenharmony_ci   * Starts a new service extension ability with account.
144361847f8eSopenharmony_ci   * If the target service extension ability is visible, you can start the target service extension ability;
144461847f8eSopenharmony_ci   * If the target service extension ability is invisible,
144561847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
144661847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
144761847f8eSopenharmony_ci   *
144861847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
144961847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
145061847f8eSopenharmony_ci   * @param { number } accountId - Indicates the account to start.
145161847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
145261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
145361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
145461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
145561847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
145661847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
145761847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
145861847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
145961847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
146061847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
146161847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
146261847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
146361847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
146461847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
146561847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
146661847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
146761847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
146861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
146961847f8eSopenharmony_ci   * @systemapi
147061847f8eSopenharmony_ci   * @stagemodelonly
147161847f8eSopenharmony_ci   * @since 12
147261847f8eSopenharmony_ci   */
147361847f8eSopenharmony_ci  startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
147461847f8eSopenharmony_ci
147561847f8eSopenharmony_ci  /**
147661847f8eSopenharmony_ci   * Starts a new service extension ability with account.
147761847f8eSopenharmony_ci   *
147861847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
147961847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
148061847f8eSopenharmony_ci   * @param { number } accountId - Indicates the account to start.
148161847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
148261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
148361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
148461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
148561847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
148661847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
148761847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
148861847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
148961847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
149061847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
149161847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
149261847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
149361847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
149461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
149561847f8eSopenharmony_ci   * @systemapi
149661847f8eSopenharmony_ci   * @stagemodelonly
149761847f8eSopenharmony_ci   * @since 9
149861847f8eSopenharmony_ci   */
149961847f8eSopenharmony_ci  /**
150061847f8eSopenharmony_ci   * Starts a new service extension ability with account.
150161847f8eSopenharmony_ci   * If the target service extension ability is visible, you can start the target service extension ability;
150261847f8eSopenharmony_ci   * If the target service extension ability is invisible,
150361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
150461847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
150561847f8eSopenharmony_ci   *
150661847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
150761847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
150861847f8eSopenharmony_ci   * @param { number } accountId - Indicates the account to start.
150961847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
151061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
151161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
151261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
151361847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
151461847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
151561847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
151661847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
151761847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
151861847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
151961847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
152061847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
152161847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
152261847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
152361847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
152461847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
152561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
152661847f8eSopenharmony_ci   * @systemapi
152761847f8eSopenharmony_ci   * @stagemodelonly
152861847f8eSopenharmony_ci   * @since 10
152961847f8eSopenharmony_ci   */
153061847f8eSopenharmony_ci  /**
153161847f8eSopenharmony_ci   * Starts a new service extension ability with account.
153261847f8eSopenharmony_ci   * If the target service extension ability is visible, you can start the target service extension ability;
153361847f8eSopenharmony_ci   * If the target service extension ability is invisible,
153461847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
153561847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
153661847f8eSopenharmony_ci   *
153761847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
153861847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
153961847f8eSopenharmony_ci   * @param { number } accountId - Indicates the account to start.
154061847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
154161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
154261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
154361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
154461847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
154561847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
154661847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
154761847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
154861847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
154961847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
155061847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
155161847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
155261847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
155361847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
155461847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
155561847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
155661847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
155761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
155861847f8eSopenharmony_ci   * @systemapi
155961847f8eSopenharmony_ci   * @stagemodelonly
156061847f8eSopenharmony_ci   * @since 12
156161847f8eSopenharmony_ci   */
156261847f8eSopenharmony_ci  startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>;
156361847f8eSopenharmony_ci
156461847f8eSopenharmony_ci  /**
156561847f8eSopenharmony_ci   * Stops a service within the same application.
156661847f8eSopenharmony_ci   *
156761847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
156861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbility.
156961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
157061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
157161847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
157261847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
157361847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
157461847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
157561847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
157661847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
157761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
157861847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
157961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
158061847f8eSopenharmony_ci   * @systemapi
158161847f8eSopenharmony_ci   * @stagemodelonly
158261847f8eSopenharmony_ci   * @since 9
158361847f8eSopenharmony_ci   */
158461847f8eSopenharmony_ci  /**
158561847f8eSopenharmony_ci   * Stops other service extension ability.
158661847f8eSopenharmony_ci   * If the target service extension ability is visible, you can stop the target service extension ability;
158761847f8eSopenharmony_ci   * If the target service extension ability is invisible,
158861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
158961847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
159061847f8eSopenharmony_ci   *
159161847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
159261847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbility.
159361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
159461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
159561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
159661847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
159761847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
159861847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
159961847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
160061847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
160161847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
160261847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
160361847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
160461847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
160561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
160661847f8eSopenharmony_ci   * @systemapi
160761847f8eSopenharmony_ci   * @stagemodelonly
160861847f8eSopenharmony_ci   * @since 10
160961847f8eSopenharmony_ci   */
161061847f8eSopenharmony_ci  stopServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void;
161161847f8eSopenharmony_ci
161261847f8eSopenharmony_ci  /**
161361847f8eSopenharmony_ci   * Stops a service within the same application.
161461847f8eSopenharmony_ci   *
161561847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
161661847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
161761847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
161861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
161961847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
162061847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
162161847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
162261847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
162361847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
162461847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
162561847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
162661847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
162761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
162861847f8eSopenharmony_ci   * @systemapi
162961847f8eSopenharmony_ci   * @stagemodelonly
163061847f8eSopenharmony_ci   * @since 9
163161847f8eSopenharmony_ci   */
163261847f8eSopenharmony_ci  /**
163361847f8eSopenharmony_ci   * Stops other service extension ability.
163461847f8eSopenharmony_ci   * If the target service extension ability is visible, you can stop the target service extension ability;
163561847f8eSopenharmony_ci   * If the target service extension ability is invisible,
163661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
163761847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
163861847f8eSopenharmony_ci   *
163961847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
164061847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
164161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
164261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
164361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
164461847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
164561847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
164661847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
164761847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
164861847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
164961847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
165061847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
165161847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
165261847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
165361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
165461847f8eSopenharmony_ci   * @systemapi
165561847f8eSopenharmony_ci   * @stagemodelonly
165661847f8eSopenharmony_ci   * @since 10
165761847f8eSopenharmony_ci   */
165861847f8eSopenharmony_ci  stopServiceExtensionAbility(want: Want): Promise<void>;
165961847f8eSopenharmony_ci
166061847f8eSopenharmony_ci  /**
166161847f8eSopenharmony_ci   * Stops a service within the same application with account.
166261847f8eSopenharmony_ci   *
166361847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
166461847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
166561847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
166661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbilityWithAccount.
166761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
166861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
166961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
167061847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
167161847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
167261847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
167361847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
167461847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
167561847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
167661847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
167761847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
167861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
167961847f8eSopenharmony_ci   * @systemapi
168061847f8eSopenharmony_ci   * @stagemodelonly
168161847f8eSopenharmony_ci   * @since 9
168261847f8eSopenharmony_ci   */
168361847f8eSopenharmony_ci  /**
168461847f8eSopenharmony_ci   * Stops other service extension ability with account.
168561847f8eSopenharmony_ci   * If the target service extension ability is visible, you can stop the target service extension ability;
168661847f8eSopenharmony_ci   * If the target service extension ability is invisible,
168761847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
168861847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
168961847f8eSopenharmony_ci   *
169061847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
169161847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
169261847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
169361847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbilityWithAccount.
169461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
169561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
169661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
169761847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
169861847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
169961847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
170061847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
170161847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
170261847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
170361847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
170461847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
170561847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
170661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
170761847f8eSopenharmony_ci   * @systemapi
170861847f8eSopenharmony_ci   * @stagemodelonly
170961847f8eSopenharmony_ci   * @since 10
171061847f8eSopenharmony_ci   */
171161847f8eSopenharmony_ci  stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
171261847f8eSopenharmony_ci
171361847f8eSopenharmony_ci  /**
171461847f8eSopenharmony_ci   * Stops a service within the same application with account.
171561847f8eSopenharmony_ci   *
171661847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
171761847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
171861847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
171961847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
172061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
172161847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
172261847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
172361847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
172461847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
172561847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
172661847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
172761847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
172861847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
172961847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
173061847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
173161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
173261847f8eSopenharmony_ci   * @systemapi
173361847f8eSopenharmony_ci   * @stagemodelonly
173461847f8eSopenharmony_ci   * @since 9
173561847f8eSopenharmony_ci   */
173661847f8eSopenharmony_ci  /**
173761847f8eSopenharmony_ci   * Stops other service extension ability with account.
173861847f8eSopenharmony_ci   * If the target service extension ability is visible, you can stop the target service extension ability;
173961847f8eSopenharmony_ci   * If the target service extension ability is invisible,
174061847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
174161847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
174261847f8eSopenharmony_ci   *
174361847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
174461847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
174561847f8eSopenharmony_ci   * @param { number } accountId - Indicates the accountId to start.
174661847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
174761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
174861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
174961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
175061847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
175161847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
175261847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
175361847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
175461847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
175561847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
175661847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
175761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
175861847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
175961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
176061847f8eSopenharmony_ci   * @systemapi
176161847f8eSopenharmony_ci   * @stagemodelonly
176261847f8eSopenharmony_ci   * @since 10
176361847f8eSopenharmony_ci   */
176461847f8eSopenharmony_ci  stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>;
176561847f8eSopenharmony_ci
176661847f8eSopenharmony_ci  /**
176761847f8eSopenharmony_ci   * Destroys this service extension.
176861847f8eSopenharmony_ci   *
176961847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of terminateSelf.
177061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
177161847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
177261847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
177361847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
177461847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
177561847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
177661847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
177761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
177861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
177961847f8eSopenharmony_ci   * @systemapi
178061847f8eSopenharmony_ci   * @stagemodelonly
178161847f8eSopenharmony_ci   * @since 9
178261847f8eSopenharmony_ci   */
178361847f8eSopenharmony_ci  /**
178461847f8eSopenharmony_ci   * Destroys this service extension.
178561847f8eSopenharmony_ci   *
178661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of terminateSelf.
178761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
178861847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
178961847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
179061847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
179161847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
179261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
179361847f8eSopenharmony_ci   * @systemapi
179461847f8eSopenharmony_ci   * @stagemodelonly
179561847f8eSopenharmony_ci   * @since 10
179661847f8eSopenharmony_ci   */
179761847f8eSopenharmony_ci  terminateSelf(callback: AsyncCallback<void>): void;
179861847f8eSopenharmony_ci
179961847f8eSopenharmony_ci  /**
180061847f8eSopenharmony_ci   * Destroys this service extension.
180161847f8eSopenharmony_ci   *
180261847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
180361847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
180461847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
180561847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
180661847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
180761847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
180861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
180961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
181061847f8eSopenharmony_ci   * @systemapi
181161847f8eSopenharmony_ci   * @stagemodelonly
181261847f8eSopenharmony_ci   * @since 9
181361847f8eSopenharmony_ci   */
181461847f8eSopenharmony_ci  /**
181561847f8eSopenharmony_ci   * Destroys this service extension.
181661847f8eSopenharmony_ci   *
181761847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
181861847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
181961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
182061847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
182161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
182261847f8eSopenharmony_ci   * @systemapi
182361847f8eSopenharmony_ci   * @stagemodelonly
182461847f8eSopenharmony_ci   * @since 10
182561847f8eSopenharmony_ci   */
182661847f8eSopenharmony_ci  terminateSelf(): Promise<void>;
182761847f8eSopenharmony_ci
182861847f8eSopenharmony_ci  /**
182961847f8eSopenharmony_ci   * Connects an ability to a Service extension.
183061847f8eSopenharmony_ci   * <p>This method can be called by an ability or service extension, but the destination of the connection must be a
183161847f8eSopenharmony_ci   * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target
183261847f8eSopenharmony_ci   * service extension when the Service extension is connected.</p>
183361847f8eSopenharmony_ci   *
183461847f8eSopenharmony_ci   * @param { Want } want - Indicates the service extension to connect.
183561847f8eSopenharmony_ci   * @param { ConnectOptions } options - Indicates the callback of connection.
183661847f8eSopenharmony_ci   * @returns { number } Returns the connection id.
183761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
183861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
183961847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
184061847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
184161847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
184261847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
184361847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
184461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
184561847f8eSopenharmony_ci   * @systemapi
184661847f8eSopenharmony_ci   * @stagemodelonly
184761847f8eSopenharmony_ci   * @since 9
184861847f8eSopenharmony_ci   */
184961847f8eSopenharmony_ci  /**
185061847f8eSopenharmony_ci   * Connects an ability to a service extension ability.
185161847f8eSopenharmony_ci   * If the target service extension ability is visible, you can connect the target service extension ability;
185261847f8eSopenharmony_ci   * If the target service extension ability is invisible,
185361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible service extension ability.
185461847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
185561847f8eSopenharmony_ci   * <p>This method can be called by an ability or service extension, but the destination of the connection must be a
185661847f8eSopenharmony_ci   * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target
185761847f8eSopenharmony_ci   * service extension when the Service extension is connected.</p>
185861847f8eSopenharmony_ci   *
185961847f8eSopenharmony_ci   * @param { Want } want - Indicates the service extension to connect.
186061847f8eSopenharmony_ci   * @param { ConnectOptions } options - Indicates the callback of connection.
186161847f8eSopenharmony_ci   * @returns { number } Returns the connection id.
186261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
186361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
186461847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
186561847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
186661847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
186761847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
186861847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
186961847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
187061847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
187161847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
187261847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
187361847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
187461847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
187561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
187661847f8eSopenharmony_ci   * @systemapi
187761847f8eSopenharmony_ci   * @stagemodelonly
187861847f8eSopenharmony_ci   * @since 10
187961847f8eSopenharmony_ci   */
188061847f8eSopenharmony_ci  connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
188161847f8eSopenharmony_ci
188261847f8eSopenharmony_ci  /**
188361847f8eSopenharmony_ci   * Connects an ability to a Service extension with account.
188461847f8eSopenharmony_ci   * <p>This method can be called by an ability or service extension, but the destination of the connection must be a
188561847f8eSopenharmony_ci   * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target
188661847f8eSopenharmony_ci   * service extension when the Service extension is connected.</p>
188761847f8eSopenharmony_ci   *
188861847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
188961847f8eSopenharmony_ci   * @param { Want } want - Indicates the service extension to connect.
189061847f8eSopenharmony_ci   * @param { number } accountId - Indicates the account to connect.
189161847f8eSopenharmony_ci   * @param { ConnectOptions } options - Indicates the callback of connection.
189261847f8eSopenharmony_ci   * @returns { number } Returns the connection id.
189361847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
189461847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
189561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
189661847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
189761847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
189861847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
189961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
190061847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
190161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
190261847f8eSopenharmony_ci   * @systemapi
190361847f8eSopenharmony_ci   * @stagemodelonly
190461847f8eSopenharmony_ci   * @since 9
190561847f8eSopenharmony_ci   */
190661847f8eSopenharmony_ci  /**
190761847f8eSopenharmony_ci   * Connects an ability to a service extension ability with account.
190861847f8eSopenharmony_ci   * If the target service extension ability is visible, you can connect the target service extension ability;
190961847f8eSopenharmony_ci   * If the target service extension ability is invisible,
191061847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible service extension ability.
191161847f8eSopenharmony_ci   * If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
191261847f8eSopenharmony_ci   * <p>This method can be called by an ability or service extension, but the destination of the connection must be a
191361847f8eSopenharmony_ci   * service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target
191461847f8eSopenharmony_ci   * service extension when the Service extension is connected.</p>
191561847f8eSopenharmony_ci   *
191661847f8eSopenharmony_ci   * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
191761847f8eSopenharmony_ci   * @param { Want } want - Indicates the service extension to connect.
191861847f8eSopenharmony_ci   * @param { number } accountId - Indicates the account to connect.
191961847f8eSopenharmony_ci   * @param { ConnectOptions } options - Indicates the callback of connection.
192061847f8eSopenharmony_ci   * @returns { number } Returns the connection id.
192161847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
192261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
192361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
192461847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
192561847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
192661847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
192761847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
192861847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
192961847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
193061847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
193161847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
193261847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
193361847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
193461847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
193561847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
193661847f8eSopenharmony_ci   * @systemapi
193761847f8eSopenharmony_ci   * @stagemodelonly
193861847f8eSopenharmony_ci   * @since 10
193961847f8eSopenharmony_ci   */
194061847f8eSopenharmony_ci  connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number;
194161847f8eSopenharmony_ci
194261847f8eSopenharmony_ci  /**
194361847f8eSopenharmony_ci   * Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
194461847f8eSopenharmony_ci   *
194561847f8eSopenharmony_ci   * @param { number } connection - the connection id returned from connectAbility api.
194661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of disconnectAbility.
194761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
194861847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
194961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
195061847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
195161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
195261847f8eSopenharmony_ci   * @systemapi
195361847f8eSopenharmony_ci   * @stagemodelonly
195461847f8eSopenharmony_ci   * @since 9
195561847f8eSopenharmony_ci   */
195661847f8eSopenharmony_ci  disconnectServiceExtensionAbility(connection: number, callback: AsyncCallback<void>): void;
195761847f8eSopenharmony_ci
195861847f8eSopenharmony_ci  /**
195961847f8eSopenharmony_ci   * Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
196061847f8eSopenharmony_ci   *
196161847f8eSopenharmony_ci   * @param { number } connection - the connection id returned from connectAbility api.
196261847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
196361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
196461847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
196561847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
196661847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
196761847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
196861847f8eSopenharmony_ci   * @systemapi
196961847f8eSopenharmony_ci   * @stagemodelonly
197061847f8eSopenharmony_ci   * @since 9
197161847f8eSopenharmony_ci   */
197261847f8eSopenharmony_ci  disconnectServiceExtensionAbility(connection: number): Promise<void>;
197361847f8eSopenharmony_ci
197461847f8eSopenharmony_ci  /**
197561847f8eSopenharmony_ci   * Get the caller object of the startup capability.
197661847f8eSopenharmony_ci   *
197761847f8eSopenharmony_ci   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
197861847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
197961847f8eSopenharmony_ci   * @returns { Promise<Caller> } Returns the Caller interface.
198061847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
198161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
198261847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
198361847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
198461847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
198561847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
198661847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
198761847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
198861847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
198961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
199061847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
199161847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
199261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
199361847f8eSopenharmony_ci   * @systemapi
199461847f8eSopenharmony_ci   * @stagemodelonly
199561847f8eSopenharmony_ci   * @since 9
199661847f8eSopenharmony_ci   */
199761847f8eSopenharmony_ci  /**
199861847f8eSopenharmony_ci   * Get the caller object of the startup capability.
199961847f8eSopenharmony_ci   * If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION to use this method.
200061847f8eSopenharmony_ci   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
200161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
200261847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
200361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
200461847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
200561847f8eSopenharmony_ci   *
200661847f8eSopenharmony_ci   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
200761847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
200861847f8eSopenharmony_ci   * @returns { Promise<Caller> } Returns the Caller interface.
200961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
201061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
201161847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
201261847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
201361847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
201461847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
201561847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
201661847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
201761847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
201861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
201961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
202061847f8eSopenharmony_ci   * @systemapi
202161847f8eSopenharmony_ci   * @stagemodelonly
202261847f8eSopenharmony_ci   * @since 10
202361847f8eSopenharmony_ci   */
202461847f8eSopenharmony_ci  startAbilityByCall(want: Want): Promise<Caller>;
202561847f8eSopenharmony_ci
202661847f8eSopenharmony_ci  /**
202761847f8eSopenharmony_ci   * Get the caller object that specifies the accountId startup capability
202861847f8eSopenharmony_ci   * If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
202961847f8eSopenharmony_ci   * and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS to use this method.
203061847f8eSopenharmony_ci   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
203161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
203261847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
203361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
203461847f8eSopenharmony_ci   *
203561847f8eSopenharmony_ci   * @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
203661847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
203761847f8eSopenharmony_ci   * @param { number } accountId - Indicates the account to start.
203861847f8eSopenharmony_ci   * @returns { Promise<Caller> } Returns the Caller interface.
203961847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
204061847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
204161847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
204261847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
204361847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
204461847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
204561847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
204661847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
204761847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
204861847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
204961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
205061847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
205161847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The application is controlled by EDM.
205261847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
205361847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
205461847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
205561847f8eSopenharmony_ci   * @systemapi
205661847f8eSopenharmony_ci   * @stagemodelonly
205761847f8eSopenharmony_ci   * @since 10
205861847f8eSopenharmony_ci   */
205961847f8eSopenharmony_ci  startAbilityByCallWithAccount(want: Want, accountId: number): Promise<Caller>;
206061847f8eSopenharmony_ci
206161847f8eSopenharmony_ci  /**
206261847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability,
206361847f8eSopenharmony_ci   * if ability is multi instance, will start a recent instance.
206461847f8eSopenharmony_ci   *
206561847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
206661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
206761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
206861847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
206961847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
207061847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
207161847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
207261847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
207361847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
207461847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
207561847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
207661847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
207761847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
207861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
207961847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
208061847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
208161847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
208261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
208361847f8eSopenharmony_ci   * @systemapi
208461847f8eSopenharmony_ci   * @stagemodelonly
208561847f8eSopenharmony_ci   * @since 9
208661847f8eSopenharmony_ci   */
208761847f8eSopenharmony_ci  /**
208861847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability, if ability is multi instance, will start a recent instance.
208961847f8eSopenharmony_ci   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
209061847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
209161847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
209261847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
209361847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
209461847f8eSopenharmony_ci   *
209561847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
209661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
209761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
209861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
209961847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
210061847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
210161847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
210261847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
210361847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
210461847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
210561847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
210661847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
210761847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
210861847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
210961847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
211061847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
211161847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
211261847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
211361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
211461847f8eSopenharmony_ci   * @systemapi
211561847f8eSopenharmony_ci   * @stagemodelonly
211661847f8eSopenharmony_ci   * @since 10
211761847f8eSopenharmony_ci   */
211861847f8eSopenharmony_ci  /**
211961847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability, if ability is multi instance, will start a recent instance.
212061847f8eSopenharmony_ci   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
212161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
212261847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
212361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
212461847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
212561847f8eSopenharmony_ci   *
212661847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
212761847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
212861847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
212961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
213061847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
213161847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
213261847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
213361847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
213461847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
213561847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
213661847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
213761847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
213861847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
213961847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
214061847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
214161847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
214261847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
214361847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
214461847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
214561847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
214661847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
214761847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
214861847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
214961847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
215061847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
215161847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
215261847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
215361847f8eSopenharmony_ci   * @systemapi
215461847f8eSopenharmony_ci   * @stagemodelonly
215561847f8eSopenharmony_ci   * @since 14
215661847f8eSopenharmony_ci   */
215761847f8eSopenharmony_ci  startRecentAbility(want: Want, callback: AsyncCallback<void>): void;
215861847f8eSopenharmony_ci
215961847f8eSopenharmony_ci  /**
216061847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability,
216161847f8eSopenharmony_ci   * if ability is multi instance, will start a recent instance.
216261847f8eSopenharmony_ci   *
216361847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
216461847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
216561847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
216661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
216761847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
216861847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
216961847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
217061847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
217161847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
217261847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
217361847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
217461847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
217561847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
217661847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
217761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
217861847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
217961847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
218061847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
218161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
218261847f8eSopenharmony_ci   * @systemapi
218361847f8eSopenharmony_ci   * @stagemodelonly
218461847f8eSopenharmony_ci   * @since 9
218561847f8eSopenharmony_ci   */
218661847f8eSopenharmony_ci  /**
218761847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability, if ability is multi instance, will start a recent instance.
218861847f8eSopenharmony_ci   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
218961847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
219061847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
219161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
219261847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
219361847f8eSopenharmony_ci   *
219461847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
219561847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
219661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
219761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
219861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
219961847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
220061847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
220161847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
220261847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
220361847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
220461847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
220561847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
220661847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
220761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
220861847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
220961847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
221061847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
221161847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
221261847f8eSopenharmony_ci   * @systemapi
221361847f8eSopenharmony_ci   * @stagemodelonly
221461847f8eSopenharmony_ci   * @since 10
221561847f8eSopenharmony_ci   */
221661847f8eSopenharmony_ci  /**
221761847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability, if ability is multi instance, will start a recent instance.
221861847f8eSopenharmony_ci   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
221961847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
222061847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
222161847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
222261847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
222361847f8eSopenharmony_ci   *
222461847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
222561847f8eSopenharmony_ci   * @param { StartOptions } options - Indicates the start options.
222661847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of startAbility.
222761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
222861847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
222961847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
223061847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
223161847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
223261847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
223361847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
223461847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
223561847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
223661847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
223761847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
223861847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
223961847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
224061847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
224161847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
224261847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
224361847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
224461847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
224561847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
224661847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
224761847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
224861847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
224961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
225061847f8eSopenharmony_ci   * @systemapi
225161847f8eSopenharmony_ci   * @stagemodelonly
225261847f8eSopenharmony_ci   * @since 14
225361847f8eSopenharmony_ci   */
225461847f8eSopenharmony_ci  startRecentAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
225561847f8eSopenharmony_ci
225661847f8eSopenharmony_ci  /**
225761847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability,
225861847f8eSopenharmony_ci   * if ability is multi instance, will start a recent instance.
225961847f8eSopenharmony_ci   *
226061847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
226161847f8eSopenharmony_ci   * @param { StartOptions } [options] - Indicates the start options.
226261847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
226361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
226461847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
226561847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
226661847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
226761847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
226861847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
226961847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
227061847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
227161847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
227261847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
227361847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
227461847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
227561847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
227661847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
227761847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
227861847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
227961847f8eSopenharmony_ci   * @systemapi
228061847f8eSopenharmony_ci   * @stagemodelonly
228161847f8eSopenharmony_ci   * @since 9
228261847f8eSopenharmony_ci   */
228361847f8eSopenharmony_ci  /**
228461847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability, if ability is multi instance, will start a recent instance.
228561847f8eSopenharmony_ci   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
228661847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
228761847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
228861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
228961847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
229061847f8eSopenharmony_ci   *
229161847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
229261847f8eSopenharmony_ci   * @param { StartOptions } [options] - Indicates the start options.
229361847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
229461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
229561847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
229661847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
229761847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
229861847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
229961847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
230061847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
230161847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
230261847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
230361847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
230461847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
230561847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
230661847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
230761847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
230861847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
230961847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
231061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
231161847f8eSopenharmony_ci   * @systemapi
231261847f8eSopenharmony_ci   * @stagemodelonly
231361847f8eSopenharmony_ci   * @since 10
231461847f8eSopenharmony_ci   */
231561847f8eSopenharmony_ci  /**
231661847f8eSopenharmony_ci   * Service extension uses this method to start a specific ability, if ability is multi instance, will start a recent instance.
231761847f8eSopenharmony_ci   * If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
231861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
231961847f8eSopenharmony_ci   * If the target ability is visible, you can start the target ability; If the target ability is invisible,
232061847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
232161847f8eSopenharmony_ci   * If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
232261847f8eSopenharmony_ci   *
232361847f8eSopenharmony_ci   * @param { Want } want - Indicates the ability to start.
232461847f8eSopenharmony_ci   * @param { StartOptions } [options] - Indicates the start options.
232561847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
232661847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
232761847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
232861847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
232961847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
233061847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
233161847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
233261847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
233361847f8eSopenharmony_ci   * @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
233461847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
233561847f8eSopenharmony_ci   * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
233661847f8eSopenharmony_ci   * @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
233761847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
233861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
233961847f8eSopenharmony_ci   * @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
234061847f8eSopenharmony_ci   * @throws { BusinessError } 16000055 - Installation-free timed out.
234161847f8eSopenharmony_ci   * @throws { BusinessError } 16000071 - App clone is not supported.
234261847f8eSopenharmony_ci   * @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
234361847f8eSopenharmony_ci   * @throws { BusinessError } 16000073 - The app clone index is invalid.
234461847f8eSopenharmony_ci   * @throws { BusinessError } 16000076 - The app instance key is invalid.
234561847f8eSopenharmony_ci   * @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
234661847f8eSopenharmony_ci   * @throws { BusinessError } 16000078 - The multi-instance is not supported.
234761847f8eSopenharmony_ci   * @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
234861847f8eSopenharmony_ci   * @throws { BusinessError } 16000080 - Creating a new instance is not supported.
234961847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
235061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
235161847f8eSopenharmony_ci   * @systemapi
235261847f8eSopenharmony_ci   * @stagemodelonly
235361847f8eSopenharmony_ci   * @since 14
235461847f8eSopenharmony_ci   */
235561847f8eSopenharmony_ci  startRecentAbility(want: Want, options?: StartOptions): Promise<void>;
235661847f8eSopenharmony_ci
235761847f8eSopenharmony_ci  /**
235861847f8eSopenharmony_ci   * Requests the Modal UIExtensionAbility.
235961847f8eSopenharmony_ci   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
236061847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
236161847f8eSopenharmony_ci   *
236261847f8eSopenharmony_ci   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
236361847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of requestModalUIExtension.
236461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
236561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
236661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
236761847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
236861847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
236961847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
237061847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
237161847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
237261847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
237361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
237461847f8eSopenharmony_ci   * @systemapi
237561847f8eSopenharmony_ci   * @stagemodelonly
237661847f8eSopenharmony_ci   * @since 11
237761847f8eSopenharmony_ci   */
237861847f8eSopenharmony_ci  /**
237961847f8eSopenharmony_ci   * Requests the specified foreground application to start the UIExtensionAbility of the corresponding type. The foreground
238061847f8eSopenharmony_ci   * application is specified by bundleName in want.parameters. If bundleName is left unspecified, or if the application
238161847f8eSopenharmony_ci   * specified by bundleName is not running in the foreground or does not exist, the UIExtensionAbility is directly started
238261847f8eSopenharmony_ci   * on the system interface. The UIExtensionAbility to start is determined by the combination of the bundleName, abilityName,
238361847f8eSopenharmony_ci   * and moduleName fields in want, and its type is determined by the ability.want.params.uiExtensionType field in want.parameters.
238461847f8eSopenharmony_ci   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
238561847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
238661847f8eSopenharmony_ci   *
238761847f8eSopenharmony_ci   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
238861847f8eSopenharmony_ci   * @param { AsyncCallback<void> } callback - The callback of requestModalUIExtension.
238961847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
239061847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
239161847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
239261847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
239361847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
239461847f8eSopenharmony_ci   * @systemapi
239561847f8eSopenharmony_ci   * @stagemodelonly
239661847f8eSopenharmony_ci   * @since 12
239761847f8eSopenharmony_ci   */
239861847f8eSopenharmony_ci  requestModalUIExtension(pickerWant: Want, callback: AsyncCallback<void>): void;
239961847f8eSopenharmony_ci
240061847f8eSopenharmony_ci  /**
240161847f8eSopenharmony_ci   * Requests the Modal UIExtensionAbility.
240261847f8eSopenharmony_ci   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
240361847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
240461847f8eSopenharmony_ci   *
240561847f8eSopenharmony_ci   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
240661847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the requestModalUIExtension.
240761847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
240861847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
240961847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
241061847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
241161847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
241261847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
241361847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Can not start invisible component.
241461847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
241561847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
241661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
241761847f8eSopenharmony_ci   * @systemapi
241861847f8eSopenharmony_ci   * @stagemodelonly
241961847f8eSopenharmony_ci   * @since 11
242061847f8eSopenharmony_ci   */
242161847f8eSopenharmony_ci  /**
242261847f8eSopenharmony_ci   * Requests the specified foreground application to start the UIExtensionAbility of the corresponding type. The foreground
242361847f8eSopenharmony_ci   * application is specified by bundleName in want.parameters. If bundleName is left unspecified, or if the application
242461847f8eSopenharmony_ci   * specified by bundleName is not running in the foreground or does not exist, the UIExtensionAbility is directly started
242561847f8eSopenharmony_ci   * on the system interface. The UIExtensionAbility to start is determined by the combination of the bundleName, abilityName,
242661847f8eSopenharmony_ci   * and moduleName fields in want, and its type is determined by the ability.want.params.uiExtensionType field in want.parameters.
242761847f8eSopenharmony_ci   * If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
242861847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
242961847f8eSopenharmony_ci   *
243061847f8eSopenharmony_ci   * @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
243161847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the requestModalUIExtension.
243261847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
243361847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
243461847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
243561847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
243661847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
243761847f8eSopenharmony_ci   * @systemapi
243861847f8eSopenharmony_ci   * @stagemodelonly
243961847f8eSopenharmony_ci   * @since 12
244061847f8eSopenharmony_ci   */
244161847f8eSopenharmony_ci  requestModalUIExtension(pickerWant: Want): Promise<void>;
244261847f8eSopenharmony_ci
244361847f8eSopenharmony_ci  /**
244461847f8eSopenharmony_ci   * preStartMission opens an atomic service window without popping up a loading window
244561847f8eSopenharmony_ci   *
244661847f8eSopenharmony_ci   * @permission ohos.permission.PRE_START_ATOMIC_SERVICE
244761847f8eSopenharmony_ci   * @param { string } bundleName - The bundle name of the atomic service.
244861847f8eSopenharmony_ci   * @param { string } moduleName - The module name of the atomic service.
244961847f8eSopenharmony_ci   * @param { string } abilityName - The ability name of the atomic service.
245061847f8eSopenharmony_ci   * @param { string } startTime - The start time of the atomic service.
245161847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
245261847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
245361847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
245461847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
245561847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
245661847f8eSopenharmony_ci   * @throws { BusinessError } 16300007 - The target free install task does not exist.
245761847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
245861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
245961847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
246061847f8eSopenharmony_ci   * @systemapi
246161847f8eSopenharmony_ci   * @stagemodelonly
246261847f8eSopenharmony_ci   * @since 12
246361847f8eSopenharmony_ci   */  
246461847f8eSopenharmony_ci  preStartMission(bundleName: string, moduleName: string, abilityName: string, startTime: string): Promise<void>;
246561847f8eSopenharmony_ci
246661847f8eSopenharmony_ci  /**
246761847f8eSopenharmony_ci   * Starts a UI service extension ability.
246861847f8eSopenharmony_ci   * If the target UI service extension ability is visible, you can start the target UI service extension ability;
246961847f8eSopenharmony_ci   * If the target UI service extension ability is invisible,
247061847f8eSopenharmony_ci   * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UI service extension ability.
247161847f8eSopenharmony_ci   *
247261847f8eSopenharmony_ci   * @param { Want } want - Indicates the want info to start.
247361847f8eSopenharmony_ci   * @returns { Promise<void> } The promise returned by the function.
247461847f8eSopenharmony_ci   * @throws { BusinessError } 201 - The application does not have permission to call the interface.
247561847f8eSopenharmony_ci   * @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
247661847f8eSopenharmony_ci   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
247761847f8eSopenharmony_ci   * 2. Incorrect parameter types; 3. Parameter verification failed.
247861847f8eSopenharmony_ci   * @throws { BusinessError } 801 - Capability not supported.
247961847f8eSopenharmony_ci   * @throws { BusinessError } 16000001 - The specified ability does not exist.
248061847f8eSopenharmony_ci   * @throws { BusinessError } 16000002 - Incorrect ability type.
248161847f8eSopenharmony_ci   * @throws { BusinessError } 16000004 - Failed to start the invisible ability.
248261847f8eSopenharmony_ci   * @throws { BusinessError } 16000005 - The specified process does not have the permission.
248361847f8eSopenharmony_ci   * @throws { BusinessError } 16000008 - The crowdtesting application expires.
248461847f8eSopenharmony_ci   * @throws { BusinessError } 16000011 - The context does not exist.
248561847f8eSopenharmony_ci   * @throws { BusinessError } 16000012 - The application is controlled.
248661847f8eSopenharmony_ci   * @throws { BusinessError } 16000013 - The EDM prohibits the application from launching.
248761847f8eSopenharmony_ci   * @throws { BusinessError } 16000019 - No matching ability is found.
248861847f8eSopenharmony_ci   * @throws { BusinessError } 16000050 - Internal error.
248961847f8eSopenharmony_ci   * @throws { BusinessError } 16200001 - The caller has been released.
249061847f8eSopenharmony_ci   * @syscap SystemCapability.Ability.AbilityRuntime.Core
249161847f8eSopenharmony_ci   * @systemapi
249261847f8eSopenharmony_ci   * @stagemodelonly
249361847f8eSopenharmony_ci   * @since 14
249461847f8eSopenharmony_ci   */
249561847f8eSopenharmony_ci  startUIServiceExtensionAbility(want: Want): Promise<void>;
249661847f8eSopenharmony_ci}
2497