Ai
46 Star 180 Fork 4.8K

OpenHarmony/interface_sdk-js
Closed

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
UIExtensionContext.d.ts 80.97 KB
Copy Edit Raw Blame History
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202
/*
* Copyright (c) 2023-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 type { AsyncCallback } from '../@ohos.base';
import ExtensionContext from './ExtensionContext';
import type Want from '../@ohos.app.ability.Want';
import type StartOptions from '../@ohos.app.ability.StartOptions';
/*** if arkts 1.1 */
import type { AbilityResult } from '../ability/abilityResult';
import type { ConnectOptions } from '../ability/connectOptions';
import type AtomicServiceOptions from '../@ohos.app.ability.AtomicServiceOptions';
import OpenLinkOptions from '../@ohos.app.ability.OpenLinkOptions';
import type ConfigurationConstant from '../@ohos.app.ability.ConfigurationConstant';
import type UIServiceProxy from './UIServiceProxy';
import type UIServiceExtensionConnectCallback from './UIServiceExtensionConnectCallback';
/*** endif */
/*** if arkts 1.2 */
import { AbilityResult } from '../ability/abilityResult';
/*** endif */
/**
* The context of UI extension. It allows access to UIExtension-specific resources.
*
* @extends ExtensionContext
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'10', '1.2':'20'}
* @arkts 1.1&1.2
*/
declare class UIExtensionContext extends ExtensionContext {
/**
* UI extension uses this method to start a specific 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 - Cannot start an 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 and prepare 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
*/
/**
* UI extension uses this method to start a specific 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 - Cannot start an 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 and prepare 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
/**
* UI extension uses this method to start a specific 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 - Cannot start an 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 and prepare 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000071 - App clone is not supported.
* @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16000076 - The app instance key is invalid.
* @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
* @throws { BusinessError } 16000078 - The multi-instance is not supported.
* @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
* @throws { BusinessError } 16000080 - Creating a new instance is not supported.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'14', '1.2':'20'}
* @arkts 1.1&1.2
*/
startAbility(want: Want, callback: AsyncCallback<void>): void;
/**
* UI extension uses this method to start a specific 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 - Cannot start an 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
*/
/**
* UI extension uses this method to start a specific 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 - Cannot start an 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
/**
* UI extension uses this method to start a specific 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 - Cannot start an 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000071 - App clone is not supported.
* @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16000076 - The app instance key is invalid.
* @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
* @throws { BusinessError } 16000078 - The multi-instance is not supported.
* @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
* @throws { BusinessError } 16000080 - Creating a new instance is not supported.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'14', '1.2':'20'}
* @arkts 1.1&1.2
*/
startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void;
/**
* UI extension uses this method to start a specific 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 - Cannot start an 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 and prepare 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
*/
/**
* UI extension uses this method to start a specific 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 - Cannot start an 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 and prepare 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
/**
* UI extension uses this method to start a specific 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 - Cannot start an 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 and prepare 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000071 - App clone is not supported.
* @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16000076 - The app instance key is invalid.
* @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
* @throws { BusinessError } 16000078 - The multi-instance is not supported.
* @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
* @throws { BusinessError } 16000080 - Creating a new instance is not supported.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'14', '1.2':'20'}
* @arkts 1.1&1.2
*/
startAbility(want: Want, options?: StartOptions): Promise<void>;
/**
* UI extension uses this method to start a specific 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 - Cannot start an 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 and prepare 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 - No matching ability is found.
* @throws { BusinessError } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
openLink(link: string, options?: OpenLinkOptions, callback?: AsyncCallback<AbilityResult>): Promise<void>;
/**
* 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 - Cannot start an 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 and prepare 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 - Cannot start an 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 and prepare 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
/**
* 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 - Cannot start an 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 and prepare 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000071 - App clone is not supported.
* @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16000076 - The app instance key is invalid.
* @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
* @throws { BusinessError } 16000078 - The multi-instance is not supported.
* @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
* @throws { BusinessError } 16000080 - Creating a new instance is not supported.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 14
*/
startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): void;
/**
* 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 - Cannot start an 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 - Cannot start an 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
/**
* 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 - Cannot start an 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000071 - App clone is not supported.
* @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16000076 - The app instance key is invalid.
* @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
* @throws { BusinessError } 16000078 - The multi-instance is not supported.
* @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
* @throws { BusinessError } 16000080 - Creating a new instance is not supported.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 14
*/
startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback<AbilityResult>): void;
/**
* 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 - Cannot start an 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 and prepare 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 - Cannot start an 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 and prepare 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
/**
* 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 - Cannot start an 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 and prepare 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 - Redirection to a third-party application is not allowed in API version greater than 11.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @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 } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000071 - App clone is not supported.
* @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16000076 - The app instance key is invalid.
* @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
* @throws { BusinessError } 16000078 - The multi-instance is not supported.
* @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
* @throws { BusinessError } 16000080 - Creating a new instance is not supported.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 14
*/
startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityResult>;
/**
* Starts a new ability using the original caller information, 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.
*
* @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 } 202 - Not System App. Interface caller is not a system app.
* @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 - Cannot start an invisible component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 12
*/
/**
* Starts a new ability using the original caller information, 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.
*
* @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 } 202 - Not System App. Interface caller is not a system app.
* @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 - Cannot start an invisible component.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16000071 - App clone is not supported.
* @throws { BusinessError } 16000072 - App clone or multi-instance is not supported.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16000076 - The app instance key is invalid.
* @throws { BusinessError } 16000077 - The number of app instances reaches the limit.
* @throws { BusinessError } 16000078 - The multi-instance is not supported.
* @throws { BusinessError } 16000079 - The APP_INSTANCE_KEY cannot be specified.
* @throws { BusinessError } 16000080 - Creating a new instance is not supported.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 14
*/
startAbilityForResultAsCaller(want: Want, options?: StartOptions): Promise<AbilityResult>;
/**
* 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 - Cannot start an 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.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
connectServiceExtensionAbility(want: Want, 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 10
*/
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 10
*/
disconnectServiceExtensionAbility(connection: number): Promise<void>;
/**
* Report to system when the extension is drawn completed.
*
* @param { AsyncCallback<void> } callback - The callback of startUIExtensionAbility.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
reportDrawnCompleted(callback: AsyncCallback<void>): void;
/**
* Destroys the UI extension.
*
* @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.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
terminateSelf(callback: AsyncCallback<void>): void;
/**
* Destroys the UI extension.
*
* @returns { Promise<void> } The promise returned by the function.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
terminateSelf(): Promise<void>;
/**
* Destroys the UI extension 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.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void;
/**
* Destroys the UI extension 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.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
terminateSelfWithResult(parameter: AbilityResult): 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 specified ID does not exist.
* @throws { BusinessError } 16000004 - Cannot start an invisible component.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
openAtomicService(appId: string, options?: AtomicServiceOptions): Promise<AbilityResult>;
/**
* Starts a UI service extension ability.
* If the target UI service extension ability is visible, you can start the target UI service extension ability;
* If the target UI service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible UI 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 } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Cannot start an invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @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 - No matching ability is found.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 14
*/
startUIServiceExtensionAbility(want: Want): Promise<void>;
/**
* Connects to a UI service extension ability.
* If the target UI service extension ability is visible, you can connect the target UI service extension ability;
* If the target UI service extension ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to connect target invisible UI service extension ability.
*
* @param { Want } want - Indicates the want info to connect.
* @param { UIServiceExtensionConnectCallback } callback - The callback of connection.
* @returns { Promise<UIServiceProxy> } The promise to get UIServiceProxy.
* @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 } 801 - Capability not supported.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Cannot start an invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 14
*/
connectUIServiceExtensionAbility(want: Want, callback: UIServiceExtensionConnectCallback) : Promise<UIServiceProxy>;
/**
* Disconnects from a UI service extension, in contrast to {@link connectUIServiceExtensionAbility}.
*
* @param { UIServiceProxy } proxy - The UI service proxy return by connectUIServiceExtensionAbility.
* @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 } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 14
*/
disconnectUIServiceExtensionAbility(proxy: UIServiceProxy): Promise<void>;
/**
* 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 - Cannot start an 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 - No matching ability is found.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 18
*/
startServiceExtensionAbility(want: Want): Promise<void>;
/**
* 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 - Cannot start an 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 - No matching ability is found.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 18
*/
startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>;
/**
* Set the uiextension to either not allow being covered by the host page or allow it.
*
* @param { boolean } isForbidden - Indicates the bool value of uiextension can be covered by host page.
* True indicates not allowing.
* False indicates allowing.
* @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.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 15
*/
setHostPageOverlayForbidden(isForbidden: boolean) : void;
/**
* Set colorMode of uiextension.
*
* @param { ConfigurationConstant.ColorMode } colorMode - Color mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 18
*/
setColorMode(colorMode: ConfigurationConstant.ColorMode): void;
/**
* Starts multi UIAbility simultaneously. If the caller application is in foreground, you can use
* this method to start abilities; 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.
*
* @param { Array<Want> } wantList - Indicates the want info list 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 - Not system application.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Cannot start an 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 } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16000076 - The app instance key is invalid.
* @throws { BusinessError } 16000080 - Creating a new instance is not supported.
* @throws { BusinessError } 16000120 - A maximum of four UIAbility instances can be started simultaneously.
* The current parameter exceeds the maximum number or is less than 1.
* @throws { BusinessError } 16000121 - The target component type is not a UIAbility.
* @throws { BusinessError } 16000122 - The target component is blocked by the system module and
* does not support startup.
* @throws { BusinessError } 16000123 - Implicit startup is not supported.
* @throws { BusinessError } 16000124 - Starting a remote UIAbility is not supported.
* @throws { BusinessError } 16000125 - Starting a plugin UIAbility is not supported.
* @throws { BusinessError } 16000126 - Starting DLP files is not supported.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 20
*/
startUIAbilities(wantList: Array<Want>): Promise<void>;
/**
* Starts two UIAbilities simultaneously in split-screen. The first UIAbility instance is identified
* by windowId, and the second UIAbility instance is identified by Want. If the first UIAbility instance
* is destroyed, the second UIAbility instance will start in full-screen mode only.
*
* If the caller application is in foreground, you can use
* this method to start abilities; 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.START_ABILITIES_FROM_BACKGROUND
* @param { number } primaryWindowId - Indicates the window id of original caller.
* @param { Want } secondaryWant - Indicates the want of target UIAbility 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 - Not system application.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 16000001 - Target UIAbility does not exist.
* @throws { BusinessError } 16000004 - Cannot start an 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 } 16000050 - Failed to connect to the system service or system server handle failed.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @throws { BusinessError } 16000076 - The app instance key is invalid.
* @throws { BusinessError } 16000080 - Creating a new instance is not supported.
* @throws { BusinessError } 16000122 - The target component is blocked by the system module and
* does not support startup.
* @throws { BusinessError } 16000123 - Implicit startup is not supported.
* @throws { BusinessError } 16000124 - Starting a remote UIAbility is not supported.
* @throws { BusinessError } 16000125 - Starting a plugin UIAbility is not supported.
* @throws { BusinessError } 16000126 - Starting DLP files is not supported.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since 20
*/
startUIAbilitiesInSplitWindowMode(primaryWindowId: number, secondaryWant: Want): Promise<void>;
}
export default UIExtensionContext;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony/interface_sdk-js.git
git@gitee.com:openharmony/interface_sdk-js.git
openharmony
interface_sdk-js
interface_sdk-js
master

Search