interface_sdk-js/api/application/UIAbilityContext.d.ts
zhangyafei.echo 6470db9554 fixed 6c54a4b from https://gitee.com/sodanotgreen/interface_sdk-js/pulls/10400
Support uiability restore or clean.
Sig:SIG_ApplicationFramework
Feature or BugFix: Feature
Binary Source: No

Signed-off-by: zhangyafei.echo <zhangyafei12@huawei.com>
Change-Id: I9aa12e4a30dec5c22c54cd4783ff48a75fba78e0
2024-06-18 12:13:43 +00:00

3601 lines
224 KiB
TypeScript

/*
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import { AbilityInfo } from '../bundleManager/AbilityInfo';
import { AbilityResult } from '../ability/abilityResult';
import { AsyncCallback } from '../@ohos.base';
import { ConnectOptions } from '../ability/connectOptions';
import { HapModuleInfo } from '../bundleManager/HapModuleInfo';
import Context from './Context';
import Want from '../@ohos.app.ability.Want';
import StartOptions from '../@ohos.app.ability.StartOptions';
import OpenLinkOptions from '../@ohos.app.ability.OpenLinkOptions';
import { Configuration } from '../@ohos.app.ability.Configuration';
import { Caller } from '../@ohos.app.ability.UIAbility';
import image from '../@ohos.multimedia.image';
import dialogRequest from '../@ohos.app.ability.dialogRequest';
import AbilityConstant from '../@ohos.app.ability.AbilityConstant';
import type AbilityStartCallback from './AbilityStartCallback';
import window from '../@ohos.window';
import type AtomicServiceOptions from '../@ohos.app.ability.AtomicServiceOptions';
/**
* The context of an ability. It allows access to ability-specific resources.
*
* @extends Context
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* The context of an ability. It allows access to ability-specific resources.
*
* @extends Context
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @since 10
*/
/**
* The context of an ability. It allows access to ability-specific resources.
*
* @extends Context
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
export default class UIAbilityContext extends Context {
/**
* Indicates configuration information about an ability.
*
* @type { AbilityInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Indicates configuration information about an ability.
*
* @type { AbilityInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @since 10
*/
/**
* Indicates configuration information about an ability.
*
* @type { AbilityInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
abilityInfo: AbilityInfo;
/**
* Indicates configuration information about the module.
*
* @type { HapModuleInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Indicates configuration information about the module.
*
* @type { HapModuleInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @since 10
*/
/**
* Indicates configuration information about the module.
*
* @type { HapModuleInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
currentHapModuleInfo: HapModuleInfo;
/**
* Indicates configuration information.
*
* @type { Configuration }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Indicates configuration information.
*
* @type { Configuration }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @since 10
*/
/**
* Indicates configuration information.
*
* @type { Configuration }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
config: Configuration;
/**
* Indicates windowStage information.
* Exists from onWindowStageCreate lifecycle, does not exist from onWindowStageDestroy lifecycle.
*
* @type { window.WindowStage }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
windowStage: window.WindowStage;
/**
* Starts a new ability.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @since 10
*/
/**
* Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
/**
* Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
startAbility(want: Want, callback: AsyncCallback<void>): void;
/**
* Starts a new ability.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
/**
* Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
/**
* Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 801 - Capability not support.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16000067 - Start options check failed.
* @throws { BusinessError } 16000068 - Ability already running.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16300003 - The target application is not self application.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
/**
* Starts a new ability.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @since 9
*/
/**
* Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
/**
* Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
/**
* Starts a new ability. If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 801 - Capability not support.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16000067 - Start options check failed.
* @throws { BusinessError } 16000068 - Ability already running.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16300003 - The target application is not self application.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
startAbility(want: Want, options?: StartOptions): Promise<void>;
/**
* Starts a new ability by implicit want. If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { string } link - Indicates the ability to start.
* @param { OpenLinkOptions } [options] - Indicates the open link options.
* @param { AsyncCallback<AbilityResult> } [callback] - The callback is used to return the ability result.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
openLink(link: string, options?: OpenLinkOptions, callback?: AsyncCallback<AbilityResult>): Promise<void>;
/**
* Starts a new ability using the original caller information. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Starts a new ability using the original caller information. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startAbilityAsCaller(want: Want, callback: AsyncCallback<void>): void;
/**
* Starts a new ability using the original caller information. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Starts a new ability using the original caller information. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
/**
* Starts a new ability using the original caller information. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Starts a new ability using the original caller information. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startAbilityAsCaller(want: Want, options?: StartOptions): Promise<void>;
/**
* Get the caller object of the startup capability.
*
* @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
* @param { Want } want - Indicates the ability to start.
* @returns { Promise<Caller> } Returns the Caller interface.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Get the caller object of the startup capability.
* If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION to use this method.
* If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
* @param { Want } want - Indicates the ability to start.
* @returns { Promise<Caller> } Returns the Caller interface.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
/**
* Get the caller object of the startup capability in cross-device.
*
* If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { Want } want - Indicates the ability to start.
* @returns { Promise<Caller> } Returns the Caller interface.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
/**
* Get the caller object of the startup capability in cross-device.
*
* If the caller application is in foreground, you can use this method to start ability;
* If the caller application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { Want } want - Indicates the ability to start.
* @returns { Promise<Caller> } Returns the Caller interface.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
startAbilityByCall(want: Want): Promise<Caller>;
/**
* Get the caller object that specifies the accountId startup capability
* If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
* and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS to use this method.
* If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
*
* @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the ability to start.
* @param { number } accountId - Indicates the account to start.
* @returns { Promise<Caller> } Returns the Caller interface.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Get the caller object that specifies the accountId startup capability
* If the local device starts a new ability, you need to apply for permission:ohos.permission.ABILITY_BACKGROUND_COMMUNICATION
* and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS to use this method.
* If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
*
* @permission ohos.permission.ABILITY_BACKGROUND_COMMUNICATION and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the ability to start.
* @param { number } accountId - Indicates the account to start.
* @returns { Promise<Caller> } Returns the Caller interface.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startAbilityByCallWithAccount(want: Want, accountId: number): Promise<Caller>;
/**
* Starts a new ability with account. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Starts a new ability with account. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
/**
* Starts a new ability with account.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Starts a new ability with account. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Starts a new ability with account. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbilityWithAccount.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback<void>): void;
/**
* Starts a new ability with account. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Starts a new ability with account. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise<void>;
/**
* Starts an ability and returns the execution result when the ability is destroyed.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): void;
/**
* Starts an ability and returns the execution result when the ability is destroyed.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback<AbilityResult>): void;
/**
* Starts an ability and returns the execution result when the ability is destroyed.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<AbilityResult> } Returns the result of startAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<AbilityResult> } Returns the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<AbilityResult> } Returns the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<AbilityResult> } Returns the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000018 - The application is not allow jumping to other applications.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityResult>;
/**
* Starts an ability and returns the execution result when the ability is destroyed with account.
* If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed with account.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed with account.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { AsyncCallback<AbilityResult> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback<AbilityResult>): void;
/**
* Starts an ability and returns the execution result when the ability is destroyed with account.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed with account.
* If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed with account.
* If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback is used to return the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startAbilityForResultWithAccount(
want: Want,
accountId: number,
options: StartOptions,
callback: AsyncCallback<void>
): void;
/**
* Starts an ability and returns the execution result when the ability is destroyed with account.
* If the caller application is in foreground, you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<AbilityResult> } Returns the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed with account.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<AbilityResult> } Returns the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Starts an ability and returns the execution result when the ability is destroyed with account.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<AbilityResult> } Returns the result of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartOptions): Promise<AbilityResult>;
/**
* Starts a new service extension ability.
*
* @param { Want } want - Indicates the want info to start.
* @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Starts a new service extension ability.
* If the target service extension ability is visible, you can start the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the want info to start.
* @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Starts a new service extension ability.
* If the target service extension ability is visible, you can start the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the want info to start.
* @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void;
/**
* Starts a new service extension ability.
*
* @param { Want } want - Indicates the want info to start.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Starts a new service extension ability.
* If the target service extension ability is visible, you can start the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the want info to start.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Starts a new service extension ability.
* If the target service extension ability is visible, you can start the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the want info to start.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startServiceExtensionAbility(want: Want): Promise<void>;
/**
* Starts a new service extension ability with account.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Starts a new service extension ability with account.
* If the target service extension ability is visible, you can start the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Starts a new service extension ability with account.
* If the target service extension ability is visible, you can start the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @param { AsyncCallback<void> } callback - The callback of startServiceExtensionAbilityWithAccount.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
/**
* Starts a new service extension ability with account.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Starts a new service extension ability with account.
* If the target service extension ability is visible, you can start the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* Starts a new service extension ability with account.
* If the target service extension ability is visible, you can start the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the account to start.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - Can not match any component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>;
/**
* Stops other service extension ability.
*
* @param { Want } want - Indicates the want info to start.
* @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbility.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Stops other service extension ability.
* If the target service extension ability is visible, you can stop the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the want info to start.
* @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
stopServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void;
/**
* Stops other service extension ability.
*
* @param { Want } want - Indicates the want info to start.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Stops other service extension ability.
* If the target service extension ability is visible, you can stop the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the want info to start.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
stopServiceExtensionAbility(want: Want): Promise<void>;
/**
* Stops other service extension ability with account.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the accountId to start.
* @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbilityWithAccount.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Stops other service extension ability with account.
* If the target service extension ability is visible, you can stop the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the accountId to start.
* @param { AsyncCallback<void> } callback - The callback of stopServiceExtensionAbilityWithAccount.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void;
/**
* Stops other service extension ability with account.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the accountId to start.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Stops other service extension ability with account.
* If the target service extension ability is visible, you can stop the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to stop target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the want info to start.
* @param { number } accountId - Indicates the accountId to start.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>;
/**
* Destroys this Page ability.
*
* @param { AsyncCallback<void> } callback - The callback of terminateSelf.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Destroys this Page ability.
*
* @param { AsyncCallback<void> } callback - The callback of terminateSelf.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @since 10
*/
/**
* Destroys this Page ability.
*
* @param { AsyncCallback<void> } callback - The callback of terminateSelf.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
terminateSelf(callback: AsyncCallback<void>): void;
/**
* Destroys this Page ability.
*
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Destroys this Page ability.
*
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @since 10
*/
/**
* Destroys this Page ability.
*
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
terminateSelf(): Promise<void>;
/**
* Destroys the Page ability while returning the specified result code and data to the caller.
*
* @param { AbilityResult } parameter - Indicates the result to return.
* @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Destroys the Page ability while returning the specified result code and data to the caller.
*
* @param { AbilityResult } parameter - Indicates the result to return.
* @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
/**
* Destroys the Page ability while returning the specified result code and data to the caller.
*
* @param { AbilityResult } parameter - Indicates the result to return.
* @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void;
/**
* Destroys the Page ability while returning the specified result code and data to the caller.
*
* @param { AbilityResult } parameter - Indicates the result to return.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Destroys the Page ability while returning the specified result code and data to the caller.
*
* @param { AbilityResult } parameter - Indicates the result to return.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
/**
* Destroys the Page ability while returning the specified result code and data to the caller.
*
* @param { AbilityResult } parameter - Indicates the result to return.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
terminateSelfWithResult(parameter: AbilityResult): Promise<void>;
/**
* Connects the current ability to an service extension ability.
*
* @param { Want } want - The element name of the service ability
* @param { ConnectOptions } options - The remote object instance
* @returns { number } Returns the number code of the ability connected
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Connects the current ability to an service extension ability.
* If the target service extension ability is visible, you can connect the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - The element name of the service ability
* @param { ConnectOptions } options - The remote object instance
* @returns { number } Returns the number code of the ability connected
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
/**
* Connects the current ability to an service extension ability with account.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - The element name of the service ability
* @param { number } accountId - The account to connect
* @param { ConnectOptions } options - The remote object instance
* @returns { number } Returns the number code of the ability connected
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Connects the current ability to an service extension ability with account.
* If the target service extension ability is visible, you can connect the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible service extension ability.
* If the target service extension ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - The element name of the service ability
* @param { number } accountId - The account to connect
* @param { ConnectOptions } options - The remote object instance
* @returns { number } Returns the number code of the ability connected
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
connectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number;
/**
* Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
*
* @param { number } connection - The number code of the ability connected
* @param { AsyncCallback<void> } callback - The callback of disconnectAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
disconnectServiceExtensionAbility(connection: number, callback: AsyncCallback<void>): void;
/**
* Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
*
* @param { number } connection - The number code of the ability connected
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
disconnectServiceExtensionAbility(connection: number): Promise<void>;
/**
* Set mission label of current ability.
*
* @param { string } label - The label of ability that showed in recent missions.
* @param { AsyncCallback<void> } callback - The callback of setMissionLabel.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Set mission label of current ability.
*
* @param { string } label - The label of ability that showed in recent missions.
* @param { AsyncCallback<void> } callback - The callback of setMissionLabel.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
setMissionLabel(label: string, callback: AsyncCallback<void>): void;
/**
* Set mission label of current ability.
*
* @param { string } label - The label of ability that showed in recent missions.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Set mission label of current ability.
*
* @param { string } label - The label of ability that showed in recent missions.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
setMissionLabel(label: string): Promise<void>;
/**
* Set mission icon of current ability.
*
* @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
* @param { AsyncCallback<void> } callback - The callback of setMissionIcon.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Set mission icon of current ability.
*
* @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
* @param { AsyncCallback<void> } callback - The callback of setMissionIcon.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
setMissionIcon(icon: image.PixelMap, callback: AsyncCallback<void>): void;
/**
* Set mission icon of current ability.
*
* @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* Set mission icon of current ability.
*
* @param { image.PixelMap } icon - The icon of ability that showed in recent missions.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
setMissionIcon(icon: image.PixelMap): Promise<void>;
/**
* Set mission continue state of current ability.
*
* @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
* @param { AsyncCallback<void> } callback - The callback of setMissionContinueState.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
/**
* Set mission continue state of current ability.
*
* @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
* @param { AsyncCallback<void> } callback - The callback of setMissionContinueState.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
setMissionContinueState(state: AbilityConstant.ContinueState, callback: AsyncCallback<void>): void;
/**
* Set mission continue state of current ability.
*
* @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
/**
* Set mission continue state of current ability.
*
* @param { AbilityConstant.ContinueState } state - The mission continue state of current ability.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
setMissionContinueState(state: AbilityConstant.ContinueState): Promise<void>;
/**
* Restore window stage data in ability continuation
*
* @param { LocalStorage } localStorage - the storage data used to restore window stage
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Restore window stage data in ability continuation
*
* @param { LocalStorage } localStorage - the storage data used to restore window stage
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
restoreWindowStage(localStorage: LocalStorage): void;
/**
* Check to see ability is in terminating state.
*
* @returns { boolean } Returns true when ability is in terminating state, else returns false.
* @throws { BusinessError } 16000011 - The context does not exist.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Check to see ability is in terminating state.
*
* @returns { boolean } Returns true when ability is in terminating state, else returns false.
* @throws { BusinessError } 16000011 - The context does not exist.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
isTerminating(): boolean;
/**
* Service extension uses this method to start a specific ability,
* if ability is multi instance, will start a recent instance.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* If ability is multi instance, will start a recent instance. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* If ability is multi instance, will start a recent instance. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startRecentAbility(want: Want, callback: AsyncCallback<void>): void;
/**
* Service extension uses this method to start a specific ability,
* if ability is multi instance, will start a recent instance.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* If ability is multi instance, will start a recent instance. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* If ability is multi instance, will start a recent instance. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startRecentAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
/**
* Service extension uses this method to start a specific ability,
* if ability is multi instance, will start a recent instance.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 9
*/
/**
* If ability is multi instance, will start a recent instance. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 10
*/
/**
* If ability is multi instance, will start a recent instance. If the caller application is in foreground,
* you can use this method to start ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
* If the target ability is in cross-device, you need to apply for permission:ohos.permission.DISTRIBUTED_DATASYNC.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
startRecentAbility(want: Want, options?: StartOptions): Promise<void>;
/**
* Requests certain permissions from the system.
*
* @param { Want } want - Indicates the dialog service to start.
* @param { AsyncCallback<dialogRequest.RequestResult> } result - The callback is used to return the request result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Starts a service extension ability that supports modal dialog. If the caller application is in foreground,
* you can use this method to start service extension ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target service extension ability is visible, you can start the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service extension ability.
*
* @param { Want } want - Indicates the dialog service to start.
* @param { AsyncCallback<dialogRequest.RequestResult> } result - The callback is used to return the request result.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
requestDialogService(want: Want, result: AsyncCallback<dialogRequest.RequestResult>): void;
/**
* Requests certain permissions from the system.
*
* @param { Want } want - Indicates the dialog service to start.
* @returns { Promise<dialogRequest.RequestResult> } Returns the request result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* Starts a service extension ability that supports modal dialog. If the caller application is in foreground,
* you can use this method to start service extension ability; If the caller application is in the background,
* you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
* If the target service extension ability is visible, you can start the target service extension ability;
* If the target service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible service
* extension ability.
*
* @param { Want } want - Indicates the dialog service to start.
* @returns { Promise<dialogRequest.RequestResult> } Returns the request result.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
requestDialogService(want: Want): Promise<dialogRequest.RequestResult>;
/**
* Report to system when the ability is drawn completed.
*
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
/**
* Report to system when the ability is drawn completed.
*
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
/**
* Report to system when the ability is drawn completed.
*
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
reportDrawnCompleted(callback: AsyncCallback<void>): void;
/**
* Starts the UIAbility or UIExtensionAbility by type.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
*
* @param { string } type - The type of target ability.
* @param { Record<string, Object> } wantParam - Indicates the want parameter.
* @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
/**
* Starts the UIAbility or UIExtensionAbility by type.
*
* @param { string } type - The type of target ability.
* @param { Record<string, Object> } wantParam - Indicates the want parameter.
* @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
startAbilityByType(type: string, wantParam: Record<string, Object>,
abilityStartCallback: AbilityStartCallback, callback: AsyncCallback<void>): void;
/**
* Starts the UIAbility or UIExtensionAbility by type.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
*
* @param { string } type - The type of target ability.
* @param { Record<string, Object> } wantParam - Indicates the want parameter.
* @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
/**
* Starts the UIAbility or UIExtensionAbility by type.
*
* @param { string } type - The type of target ability.
* @param { Record<string, Object> } wantParam - Indicates the want parameter.
* @param { AbilityStartCallback } abilityStartCallback - Indicates the abilityStartCallback.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
* <br>2.Incorrect parameter types.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
startAbilityByType(type: string, wantParam: Record<string, Object>,
abilityStartCallback: AbilityStartCallback): Promise<void>;
/**
* Requests the Modal UIExtensionAbility.
* If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
*
* @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
* @param { AsyncCallback<void> } callback - The callback of requestModalUIExtension.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 11
*/
/**
* Requests the specified foreground application to start the UIExtensionAbility of the corresponding type. The foreground
* application is specified by bundleName in want.parameters. If bundleName is left unspecified, or if the application
* specified by bundleName is not running in the foreground or does not exist, the UIExtensionAbility is directly started
* on the system interface. The UIExtensionAbility to start is determined by the combination of the bundleName, abilityName,
* and moduleName fields in want, and its type is determined by the ability.want.params.uiExtensionType field in want.parameters.
* If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
*
* @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
* @param { AsyncCallback<void> } callback - The callback of requestModalUIExtension.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
requestModalUIExtension(pickerWant: Want, callback: AsyncCallback<void>): void;
/**
* Requests the Modal UIExtensionAbility.
* If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
*
* @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
* @returns { Promise<void> } The promise returned by the requestModalUIExtension.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Can not start invisible component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 11
*/
/**
* Requests the specified foreground application to start the UIExtensionAbility of the corresponding type. The foreground
* application is specified by bundleName in want.parameters. If bundleName is left unspecified, or if the application
* specified by bundleName is not running in the foreground or does not exist, the UIExtensionAbility is directly started
* on the system interface. The UIExtensionAbility to start is determined by the combination of the bundleName, abilityName,
* and moduleName fields in want, and its type is determined by the ability.want.params.uiExtensionType field in want.parameters.
* If the target UIExtensionAbility is visible, you can start the target UIExtensionAbility; If the target UIExtensionAbility is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UIExtensionAbility.
*
* @param { Want } pickerWant - Indicates the UIExtensionAbility to start.
* @returns { Promise<void> } The promise returned by the requestModalUIExtension.
* @throws { BusinessError } 202 - The application is not system-app, can not use system-api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
requestModalUIExtension(pickerWant: Want): Promise<void>;
/**
* Full-screen pop-us startup atomic service.
*
* @param { string } appId - Globally unique identifier of an application, which is allocated by the cloud.
* @param { AtomicServiceOptions } [options] - Indicates the atomic service start options.
* @returns { Promise<AbilityResult> } Returns the result of openAtomicService.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000003 - The appId does not exist.
* @throws { BusinessError } 16000004 - Can not start invisible component
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
openAtomicService(appId: string, options?: AtomicServiceOptions): Promise<AbilityResult>;
/**
* Move current ability to background.
*
* @returns { Promise<void> } Returns the result of moveAbilityToBackground.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000061 - Operation not supported.
* @throws { BusinessError } 16000065 - The interface can be called only when ability is foreground.
* @throws { BusinessError } 16000066 - An ability cannot move to foreground or background in Wukong mode.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
moveAbilityToBackground(): Promise<void>;
/**
* Show current ability. The ability needs to be started by UIAbilityContext.startAbility
* with input parameter options.processMode setting to NEW_PROCESS_ATTACH_TO_STATUS_BAR_ITEM.
*
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 801 - Capability not support.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000067 - Start options check failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
showAbility(): Promise<void>;
/**
* Hide current ability. The ability needs to be started by UIAbilityContext.startAbility
* with input parameter options.processMode setting to NEW_PROCESS_ATTACH_TO_STATUS_BAR_ITEM.
*
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 801 - Capability not support.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000067 - Start options check failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
hideAbility(): Promise<void>;
/**
* Set whether restoration is enabled when the UIAbility is switched back from the background.
*
* @param { boolean } enabled - The flag that indicates whether restoration is enabled when the UIAbility is switched
* back from the background.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000011 - The context does not exist.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
setRestoreEnabled(enabled: boolean): void;
}