Signed-off-by: xinking129 <xinxin13@huawei.com>
This commit is contained in:
xinking129 2023-05-26 10:24:08 +08:00
parent f516fb7563
commit c0f046f6a3
89 changed files with 2675 additions and 1774 deletions

View File

@ -25,7 +25,7 @@ import rdb from '../../@ohos.data.rdb';
import rpc from '../../@ohos.rpc';
import resourceManager from '../../@ohos.resourceManager';
import { PacMap } from '../../ability/dataAbilityHelper';
import { AsyncCallback } from "../../@ohos.base";
import { AsyncCallback } from '../../@ohos.base';
/**
* interface of form lifecycle.

View File

@ -20,7 +20,7 @@
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.dataUriUtils
* @useinstead ohos.app.ability.dataUriUtils/dataUriUtils
*/
declare namespace dataUriUtils {
/**
@ -31,7 +31,7 @@ declare namespace dataUriUtils {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.dataUriUtils#getId
* @useinstead ohos.app.ability.dataUriUtils/dataUriUtils#getId
*/
function getId(uri: string): number;
@ -44,7 +44,7 @@ declare namespace dataUriUtils {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.dataUriUtils#attachId
* @useinstead ohos.app.ability.dataUriUtils/dataUriUtils#attachId
*/
function attachId(uri: string, id: number): string;
@ -56,7 +56,7 @@ declare namespace dataUriUtils {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.dataUriUtils#deleteId
* @useinstead ohos.app.ability.dataUriUtils/dataUriUtils#deleteId
*/
function deleteId(uri: string): string;
@ -69,7 +69,7 @@ declare namespace dataUriUtils {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.dataUriUtils#updateId
* @useinstead ohos.app.ability.dataUriUtils/dataUriUtils#updateId
*/
function updateId(uri: string, id: number): string;
}

View File

@ -249,52 +249,51 @@ declare namespace featureAbility {
* @since 7
*/
export enum AbilityWindowConfiguration {
/**
* Undefined window format.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* Undefined window format.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
WINDOW_MODE_UNDEFINED = 0,
/**
* Full screen.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* Full screen.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
WINDOW_MODE_FULLSCREEN = 1,
/**
* If the screen is horizontally oriented, it indicates left split, and if the screen is vertically oriented,
* it indicates upper split.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* If the screen is horizontally oriented, it indicates left split, and if the screen is vertically oriented,
* it indicates upper split.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
WINDOW_MODE_SPLIT_PRIMARY = 100,
/**
* If the screen is horizontally oriented, it indicates right split, and if the screen is vertically oriented,
* it indicates bottom split.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* If the screen is horizontally oriented, it indicates right split, and if the screen is vertically oriented,
* it indicates bottom split.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
WINDOW_MODE_SPLIT_SECONDARY = 101,
/**
* Suspended window.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* Suspended window.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
WINDOW_MODE_FLOATING = 102
}
@ -307,32 +306,31 @@ declare namespace featureAbility {
* @since 7
*/
export enum AbilityStartSetting {
/**
* The parameter name for the window display size attribute.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* The parameter name for the window display size attribute.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
BOUNDS_KEY = 'abilityBounds',
/**
* The parameter name of the window display mode attribute.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* The parameter name of the window display mode attribute.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
WINDOW_MODE_KEY = 'windowMode',
/**
* The window displays the parameter name of the device ID attribute.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* The window displays the parameter name of the device ID attribute.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
DISPLAY_ID_KEY = 'displayId'
}
@ -345,41 +343,40 @@ declare namespace featureAbility {
* @since 7
*/
export enum ErrorCode {
/**
* There are no errors.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* There are no errors.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
NO_ERROR = 0,
/**
* Invalid parameter.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* Invalid parameter.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
INVALID_PARAMETER = -1,
/**
* Unable to find ABILITY.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* Unable to find ABILITY.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
ABILITY_NOT_FOUND = -2,
/**
* Permission denied.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* Permission denied.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
PERMISSION_DENY = -3
}
@ -392,41 +389,40 @@ declare namespace featureAbility {
* @since 7
*/
export enum DataAbilityOperationType {
/**
* Insert type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* Insert type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
TYPE_INSERT = 1,
/**
* Modify the type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* Modify the type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
TYPE_UPDATE = 2,
/**
* Delete type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* Delete type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
TYPE_DELETE = 3,
/**
* Declaration type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* Declaration type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
TYPE_ASSERT = 4
}

View File

@ -94,7 +94,7 @@ declare namespace particleAbility {
* @FAModelOnly
* @since 7
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager#startBackgroundRunning
* @useinstead ohos.resourceschedule.backgroundTaskManager/backgroundTaskManager#startBackgroundRunning
*/
function startBackgroundRunning(id: number, request: NotificationRequest, callback: AsyncCallback<void>): void;
@ -110,7 +110,7 @@ declare namespace particleAbility {
* @FAModelOnly
* @since 7
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager#startBackgroundRunning
* @useinstead ohos.resourceschedule.backgroundTaskManager/backgroundTaskManager#startBackgroundRunning
*/
function startBackgroundRunning(id: number, request: NotificationRequest): Promise<void>;
@ -122,7 +122,7 @@ declare namespace particleAbility {
* @FAModelOnly
* @since 7
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager#stopBackgroundRunning
* @useinstead ohos.resourceschedule.backgroundTaskManager/backgroundTaskManager#stopBackgroundRunning
*/
function cancelBackgroundRunning(callback: AsyncCallback<void>): void;
@ -134,7 +134,7 @@ declare namespace particleAbility {
* @FAModelOnly
* @since 7
* @deprecated since 9
* @useinstead ohos.resourceschedule.backgroundTaskManager#stopBackgroundRunning
* @useinstead ohos.resourceschedule.backgroundTaskManager/backgroundTaskManager#stopBackgroundRunning
*/
function cancelBackgroundRunning(): Promise<void>;
@ -182,13 +182,13 @@ declare namespace particleAbility {
* @since 7
*/
export enum ErrorCode {
/**
* Invalid parameter.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
/**
* Invalid parameter.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
*/
INVALID_PARAMETER = -1
}
}

View File

@ -20,7 +20,7 @@
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.wantConstant
* @useinstead ohos.app.ability.wantConstant/wantConstant
*/
declare namespace wantConstant {
/**

View File

@ -23,6 +23,7 @@
*/
/**
* The definition of AbilityConstant.
*
* @namespace AbilityConstant
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -40,6 +41,7 @@ declare namespace AbilityConstant {
*/
/**
* Interface of launch param.
*
* @typedef LaunchParam
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -50,12 +52,15 @@ declare namespace AbilityConstant {
/**
* Indicates launch reason.
*
* @type { LaunchReason }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 9
*/
/**
* Indicates launch reason.
*
* @type { LaunchReason }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
@ -66,12 +71,15 @@ declare namespace AbilityConstant {
/**
* Indicates last exit reason.
*
* @type { LastExitReason }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 9
*/
/**
* Indicates last exit reason.
*
* @type { LastExitReason }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
@ -90,6 +98,7 @@ declare namespace AbilityConstant {
*/
/**
* Type of launch reason.
*
* @enum { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -131,7 +140,7 @@ declare namespace AbilityConstant {
CALL = 2,
/**
* Cross-end device migration starts ability.
* Start ability through cross-end device migration.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -152,6 +161,7 @@ declare namespace AbilityConstant {
* Start ability through the acquireShareData interface.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 10
*/
SHARE = 5
@ -167,6 +177,7 @@ declare namespace AbilityConstant {
*/
/**
* Type of last exit reason.
*
* @enum { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -313,8 +324,8 @@ declare namespace AbilityConstant {
WINDOW_MODE_FULLSCREEN = 1,
/**
* The horizontal direction of the screen indicates the left split screen, and the vertical direction of the
* screen indicates the upper split screen.
* If the screen is horizontal, it means the right split screen, and if the screen is vertical,
* it means the lower split screen.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
@ -335,7 +346,7 @@ declare namespace AbilityConstant {
WINDOW_MODE_SPLIT_SECONDARY = 101,
/**
* Free floating form window mode.
* Free floating window mode.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
@ -364,7 +375,7 @@ declare namespace AbilityConstant {
ALL_AGREE = 0,
/**
* Refuse to migrate save state.
* Refuse to migrate the saved state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -373,7 +384,7 @@ declare namespace AbilityConstant {
CONTINUATION_REJECT = 1,
/**
* The migration does not match.
* Migration mismatch.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -391,7 +402,7 @@ declare namespace AbilityConstant {
RECOVERY_AGREE = 3,
/**
* Refusing to restore the saved state.
* Refuse to restore the saved state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -428,7 +439,7 @@ declare namespace AbilityConstant {
CONTINUATION = 0,
/**
* Apply to restore the saved state.
* App recovery to restore the saved state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly

View File

@ -27,6 +27,7 @@ import { Configuration } from './@ohos.app.ability.Configuration';
*/
/**
* The class of an ability stage.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
@ -43,6 +44,7 @@ export default class AbilityStage {
*/
/**
* Indicates configuration information about context.
*
* @type { AbilityStageContext }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -60,6 +62,7 @@ export default class AbilityStage {
*/
/**
* Called back when an ability stage is started for initialization.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
@ -90,6 +93,7 @@ export default class AbilityStage {
*/
/**
* Called when the system configuration is updated.
*
* @param { Configuration } newConfig - Indicates the updated configuration.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly

View File

@ -29,7 +29,8 @@ declare namespace ConfigurationConstant {
* @since 9
*/
/**
* ColorMode
* Color mode
*
* @enum { number }
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
@ -40,27 +41,45 @@ declare namespace ConfigurationConstant {
* The color mode is not set.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 9
*/
/**
* The color mode is not set.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 10
*/
COLOR_MODE_NOT_SET = -1,
/**
* Dark mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 9
*/
/**
* Dark mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 10
*/
COLOR_MODE_DARK = 0,
/**
* Light mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 9
*/
/**
* Light mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 10
*/
COLOR_MODE_LIGHT = 1
}
@ -72,7 +91,8 @@ declare namespace ConfigurationConstant {
* @since 9
*/
/**
* Direction
* Screen direction.
*
* @enum { number }
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
@ -83,27 +103,45 @@ declare namespace ConfigurationConstant {
* The direction is not set.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 9
*/
/**
* The direction is not set.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 10
*/
DIRECTION_NOT_SET = -1,
/**
* Vertical direction.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 9
*/
/**
* Vertical direction.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 10
*/
DIRECTION_VERTICAL = 0,
/**
* Horizontal direction.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 9
*/
/**
* Horizontal direction.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 10
*/
DIRECTION_HORIZONTAL = 1
}

View File

@ -16,7 +16,7 @@
import Ability from './@ohos.app.ability.Ability';
/**
* class of extension.
* class of extension ability.
*
* @extends Ability
* @syscap SystemCapability.Ability.AbilityRuntime.Core

View File

@ -30,6 +30,7 @@ export default class ServiceExtensionAbility {
/**
* Indicates service extension ability context.
*
* @type { ServiceExtensionContext }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @StageModelOnly

View File

@ -98,7 +98,7 @@ export interface Caller {
callWithResult(method: string, data: rpc.Parcelable): Promise<rpc.MessageSequence>;
/**
* Clear service records.
* Register the generic component server Stub (stub) disconnect listening notification.
*
* @throws { BusinessError } 16200001 - Caller released. The caller has been released.
* @throws { BusinessError } 16200002 - Callee invalid. The callee does not exist.
@ -184,8 +184,8 @@ export interface Callee {
* @param { string } method - A string registered to listen for notification events.
* @param { CalleeCallback } callback - Register a callback function that listens for notification events.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16200004 Method registered. The method has registered.
* @throws { BusinessError } 16000050 Internal error.
* @throws { BusinessError } 16200004 - Method registered. The method has registered.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @since 9
@ -197,8 +197,8 @@ export interface Callee {
*
* @param { string } method - A string registered to listen for notification events.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16200005 Method not registered. The method has not registered.
* @throws { BusinessError } 16000050 Internal error.
* @throws { BusinessError } 16200005 - Method not registered. The method has not registered.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @since 9
@ -234,6 +234,7 @@ export default class UIAbility extends Ability {
*/
/**
* Indicates configuration information about an ability context.
*
* @type { UIAbilityContext }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
@ -283,6 +284,7 @@ export default class UIAbility extends Ability {
*/
/**
* Called back when an ability is started for initialization.
*
* @param { Want } want - Indicates the want info of the created ability.
* @param { AbilityConstant.LaunchParam } param - Indicates the launch param.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
@ -302,6 +304,7 @@ export default class UIAbility extends Ability {
*/
/**
* Called back when an ability window stage is created.
*
* @param { window.WindowStage } windowStage - Indicates the created WindowStage.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
@ -319,6 +322,7 @@ export default class UIAbility extends Ability {
*/
/**
* Called back when an ability window stage is destroyed.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @crossplatform
@ -364,6 +368,7 @@ export default class UIAbility extends Ability {
*/
/**
* Called back when the state of an ability changes to foreground.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @crossplatform
@ -380,6 +385,7 @@ export default class UIAbility extends Ability {
*/
/**
* Called back when the state of an ability changes to background.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @crossplatform
@ -411,6 +417,7 @@ export default class UIAbility extends Ability {
/**
* Called when the launch mode of an ability is set to singleton.
* This happens when you re-launch an ability that has been at the top of the ability stack.
*
* @param { Want } want - Indicates the want info of ability.
* @param { AbilityConstant.LaunchParam } launchParams - Indicates the launch parameters.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore

View File

@ -21,6 +21,7 @@
*/
/**
* Want is the basic communication component of the system.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 10
@ -35,6 +36,7 @@ export default class Want {
*/
/**
* bundle name
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 10
@ -50,6 +52,7 @@ export default class Want {
*/
/**
* ability name
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 10
@ -104,14 +107,14 @@ export default class Want {
/**
* The description of the WantParams object in an Want
*
* @type { ?[key: string]: Object }
* @type { ?object }
* @syscap SystemCapability.Ability.AbilityBase
* @since 9
*/
/**
* The description of the WantParams object in an Want
*
* @type { ?[key: string]: Object }
* @type { ?object }
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 10
@ -136,6 +139,7 @@ export default class Want {
*/
/**
* The description of an module name in an want.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @since 10

View File

@ -53,28 +53,28 @@ declare namespace abilityDelegatorRegistry {
* @since 9
*/
export enum AbilityLifecycleState {
/**
* Ability is in invalid state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
/**
* Ability is in invalid state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
UNINITIALIZED,
/**
* Ability is in the created state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
/**
* Ability is in the created state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
CREATE,
/**
* Ability is in the foreground state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
/**
* Ability is in the foreground state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
FOREGROUND,
/**

View File

@ -216,7 +216,7 @@ declare namespace abilityManager {
* Acquire the shared data from target ability.
*
* @param { number } missionId - The missionId of target ability.
* @param { AsyncCallback<{ [key: string]: Object }> } callback - The callback is used to return the params of sharing
* @param { AsyncCallback<{ object }> } callback - The callback is used to return the params of sharing
* data and result code.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
@ -231,7 +231,7 @@ declare namespace abilityManager {
* Acquire the shared data from target ability.
*
* @param { number } missionId - The missionId of target ability.
* @returns { Promise<{ [key: string]: Object }> } The promise returned by the function.
* @returns { Promise<{ object }> } The promise returned by the function.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000050 - Internal error.

View File

@ -125,9 +125,9 @@ declare namespace appRecovery {
/**
* Enable appRecovery function.
*
* @param { RestartFlag } restart The flag that determines the restart cases of your app, default value is { ALWAYS_RESTART }.
* @param { SaveOccasionFlag } saveOccasion The flag that determines when to save ability state, default value is { SAVE_WHEN_ERROR }.
* @param { SaveModeFlag } saveMode The flag that determines how to save the ability state, default value is { SAVE_WITH_FILE }.
* @param { RestartFlag } [restart] The flag that determines the restart cases of your app, default value is { ALWAYS_RESTART }.
* @param { SaveOccasionFlag } [saveOccasion] The flag that determines when to save ability state, default value is { SAVE_WHEN_ERROR }.
* @param { SaveModeFlag } [saveMode] The flag that determines how to save the ability state, default value is { SAVE_WITH_FILE }.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 9
@ -169,7 +169,7 @@ declare namespace appRecovery {
/**
* Save the ability state according to the context.
*
* @param { UIAbilityContext } context - context indicates the ability context you want to save state.
* @param { UIAbilityContext } [context] - context indicates the ability context you want to save state.
* If context is not specified, the onSaveState will be invoked on all the recoverable abilities in current process.
* @returns { boolean } true if save data successfully, otherwise false.
* @syscap SystemCapability.Ability.AbilityRuntime.Core

View File

@ -53,12 +53,13 @@ declare namespace common {
*/
/**
* The context of an ability. It allows access to ability-specific resources.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
* @since 10
*/
export type UIAbilityContext = _UIAbilityContext.default
export type UIAbilityContext = _UIAbilityContext.default;
/**
* The context of an abilityStage. It allows access to abilityStage-specific resources.
@ -69,12 +70,13 @@ declare namespace common {
*/
/**
* The context of an abilityStage. It allows access to abilityStage-specific resources.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
* @since 10
*/
export type AbilityStageContext = _AbilityStageContext.default
export type AbilityStageContext = _AbilityStageContext.default;
/**
* The context of an application. It allows access to application-specific resources.
@ -85,12 +87,13 @@ declare namespace common {
*/
/**
* The context of an application. It allows access to application-specific resources.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
* @since 10
*/
export type ApplicationContext = _ApplicationContext.default
export type ApplicationContext = _ApplicationContext.default;
/**
* The base context of 'app.Context' for FA Mode or 'application.Context' for Stage Mode.
@ -100,11 +103,12 @@ declare namespace common {
*/
/**
* The base context of 'app.Context' for FA Mode or 'application.Context' for Stage Mode.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
* @since 10
*/
export type BaseContext = _BaseContext.default
export type BaseContext = _BaseContext.default;
/**
* The base context of an ability or an application. It allows access to
@ -117,12 +121,13 @@ declare namespace common {
/**
* The base context of an ability or an application. It allows access to
* application-specific resources.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
* @since 10
*/
export type Context = _Context.default
export type Context = _Context.default;
/**
* The context of an extension. It allows access to extension-specific resources.

View File

@ -69,6 +69,7 @@ declare namespace dialogRequest {
/**
* The request result passed in by the user.
*
* @type { ResultCode }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 9

View File

@ -370,7 +370,7 @@ declare namespace missionManager {
*
* @permission ohos.permission.MANAGE_MISSIONS
* @param { number } missionId - Indicates mission id to be moved to foreground.
* @param { StartOptions } options - Indicates the start options.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.

View File

@ -37,6 +37,7 @@ declare namespace quickFixManager {
* Indicates hap module name.
*
* @type { string }
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.QuickFix
* @systemapi
* @since 9
@ -47,6 +48,7 @@ declare namespace quickFixManager {
* Indicates hash value of a hap.
*
* @type { string }
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.QuickFix
* @systemapi
* @since 9
@ -57,6 +59,7 @@ declare namespace quickFixManager {
* Indicates installed path of quick fix file.
*
* @type { string }
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.QuickFix
* @systemapi
* @since 9
@ -77,6 +80,7 @@ declare namespace quickFixManager {
* Bundle name.
*
* @type { string }
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.QuickFix
* @systemapi
* @since 9
@ -87,6 +91,7 @@ declare namespace quickFixManager {
* The version number of the bundle.
*
* @type { number }
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.QuickFix
* @systemapi
* @since 9
@ -97,6 +102,7 @@ declare namespace quickFixManager {
* The version name of the bundle.
*
* @type { string }
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.QuickFix
* @systemapi
* @since 9
@ -107,6 +113,7 @@ declare namespace quickFixManager {
* The version number of the quick fix.
*
* @type { number }
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.QuickFix
* @systemapi
* @since 9
@ -117,6 +124,7 @@ declare namespace quickFixManager {
* The version name of the quick fix.
*
* @type { string }
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.QuickFix
* @systemapi
* @since 9
@ -127,6 +135,7 @@ declare namespace quickFixManager {
* Hap module quick fix info.
*
* @type { Array<HapModuleQuickFixInfo> }
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.QuickFix
* @systemapi
* @since 9
@ -172,6 +181,7 @@ declare namespace quickFixManager {
/**
* Revoke quick fix by bundle name.
*
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED and ohos.permission.INSTALL_BUNDLE
* @param { string } bundleName - Bundle name wish to revoke quick fix.
* @param { AsyncCallback<void> } callback
@ -188,6 +198,7 @@ declare namespace quickFixManager {
/**
* Revoke quick fix by bundle name.
*
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED and ohos.permission.INSTALL_BUNDLE
* @param { string } bundleName - Bundle name wish to revoke quick fix.
* @returns { Promise<void> }

View File

@ -140,7 +140,7 @@ declare namespace wantAgent {
*
* @param { WantAgent } agent - Indicates the WantAgent.
* @param { TriggerInfo } triggerInfo - Indicates the information required for triggering a WantAgent.
* @param { AsyncCallback<CompleteData> } callback - The callback is used to return the CompleteData.
* @param { AsyncCallback<CompleteData> } [callback] - The callback is used to return the CompleteData.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
@ -414,7 +414,7 @@ declare namespace wantAgent {
/**
* Extra data collected by the common event.
*
* @type { ?[key: string]: Object }
* @type { ?object }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/

View File

@ -99,8 +99,8 @@ declare namespace businessAbilityRouter {
*
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @param { BusinessAbilityFilter } filter - Indicates the filter containing the business ability info to be queried.
* @param { AsyncCallback<Array<BusinessAbilityInfo>> } callback - The callback of querying business ability
* info result.
* @param { AsyncCallback<Array<BusinessAbilityInfo>> } callback - The callback of querying business ability info
* result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - non-system app called system api.
* @throws { BusinessError } 401 - The parameter check failed.

View File

@ -26,7 +26,7 @@ declare namespace formBindingData {
/**
* Create an FormBindingData instance.
*
* @param { Object | string } obj - Indicates the FormBindingData instance data.
* @param { Object | string } [obj] - Indicates the FormBindingData instance data.
* @returns { FormBindingData } Returns the FormBindingData.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.Form

File diff suppressed because it is too large Load Diff

View File

@ -34,6 +34,7 @@ declare namespace formInfo {
/**
* Obtains the bundle name of the application to which this form belongs.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -42,6 +43,7 @@ declare namespace formInfo {
/**
* Obtains the name of the application module to which this form belongs.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -50,6 +52,7 @@ declare namespace formInfo {
/**
* Obtains the class name of the ability to which this form belongs.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -58,6 +61,7 @@ declare namespace formInfo {
/**
* Obtains the name of this form.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -65,6 +69,8 @@ declare namespace formInfo {
/**
* Obtains the description of this form.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -73,6 +79,7 @@ declare namespace formInfo {
/**
* Obtains the description id of this form.
*
* @type { number }
* @syscap SystemCapability.Ability.Form
* @since 10
*/
@ -81,6 +88,7 @@ declare namespace formInfo {
/**
* Obtains the type of this form. Currently, JS forms are supported.
*
* @type { FormType }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -89,6 +97,7 @@ declare namespace formInfo {
/**
* Obtains the JS component name of this JS form.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -97,6 +106,7 @@ declare namespace formInfo {
/**
* Obtains the color mode of this form.
*
* @type { ColorMode }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -105,6 +115,7 @@ declare namespace formInfo {
/**
* Checks whether this form is a default form.
*
* @type { boolean }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -113,6 +124,7 @@ declare namespace formInfo {
/**
* Obtains the updateEnabled.
*
* @type { boolean }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -121,6 +133,7 @@ declare namespace formInfo {
/**
* Obtains whether notify visible of this form.
*
* @type { boolean }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -129,6 +142,7 @@ declare namespace formInfo {
/**
* Obtains the scheduledUpdateTime.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -137,6 +151,7 @@ declare namespace formInfo {
/**
* Obtains the form config ability about this form.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -145,6 +160,7 @@ declare namespace formInfo {
/**
* Obtains the updateDuration.
*
* @type { number }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -153,6 +169,7 @@ declare namespace formInfo {
/**
* Obtains the default grid style of this form.
*
* @type { number }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -161,6 +178,7 @@ declare namespace formInfo {
/**
* Obtains the grid styles supported by this form.
*
* @type { Array<number> }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -169,6 +187,7 @@ declare namespace formInfo {
/**
* Obtains the custom data defined in this form.
*
* @type { object }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -244,6 +263,7 @@ declare namespace formInfo {
/**
* Obtains the form state.
*
* @type { FormState }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -252,6 +272,7 @@ declare namespace formInfo {
/**
* Obtains the want form .
*
* @type { Want }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -474,6 +495,7 @@ declare namespace formInfo {
* optional moduleName that used to ask getFormsInfo to return
* form infos with the same moduleName.
*
* @type { ?string }
* @syscap SystemCapability.Ability.Form
* @since 9
*/
@ -540,6 +562,7 @@ declare namespace formInfo {
* Indicates the type of the form type is unknown.
* Often used as a condition variable in function OnVisibilityChange to specify actions only on forms that are
* changing to unknown.
*
* @syscap SystemCapability.Ability.Form
* @since 10
*/
@ -590,6 +613,7 @@ declare namespace formInfo {
/**
* Information about a running form.
*
* @typedef FormProviderFilter
* @syscap SystemCapability.Ability.Form
* @systemapi
@ -599,6 +623,8 @@ declare namespace formInfo {
interface FormProviderFilter {
/**
* Obtains the bundle name of the provider application.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
@ -608,30 +634,36 @@ declare namespace formInfo {
/**
* Obtains the form name of the provider application form.
*
* @type { ?string }
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 10
*/
formName ?: string;
formName?: string;
/**
* Obtains the module name of the provider application module.
*
* @type { ?string }
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 10
*/
moduleName ?: string;
moduleName?: string;
/**
* Obtains the ability name of the provider application module.
*
* @type { ?string }
* @syscap SystemCapability.Ability.Form
* @systemapi
* @stagemodelonly
* @since 10
*/
abilityName ?: string;
abilityName?: string;
}
/**
@ -645,6 +677,7 @@ declare namespace formInfo {
interface RunningFormInfo {
/**
* Obtains the id of the this form.
*
* @type { string }
* @default -
* @syscap SystemCapability.Ability.Form
@ -655,6 +688,7 @@ declare namespace formInfo {
/**
* Obtains the bundle name of the application to which this form belongs.
*
* @type { string }
* @default -
* @syscap SystemCapability.Ability.Form
@ -665,6 +699,7 @@ declare namespace formInfo {
/**
* Obtains the bundle name of the form host application.
*
* @type { string }
* @default -
* @syscap SystemCapability.Ability.Form
@ -675,6 +710,7 @@ declare namespace formInfo {
/**
* Obtains the visibility of this form.
*
* @type { VisibilityType }
* @default -
* @syscap SystemCapability.Ability.Form
@ -685,6 +721,7 @@ declare namespace formInfo {
/**
* Obtains the name of the application module to which this form belongs.
*
* @type { string }
* @default -
* @syscap SystemCapability.Ability.Form
@ -695,6 +732,7 @@ declare namespace formInfo {
/**
* Obtains the class name of the ability to which this form belongs.
*
* @type { string }
* @default -
* @syscap SystemCapability.Ability.Form
@ -705,6 +743,7 @@ declare namespace formInfo {
/**
* Obtains the name of this form.
*
* @type { string }
* @default -
* @syscap SystemCapability.Ability.Form
@ -715,6 +754,7 @@ declare namespace formInfo {
/**
* Obtains the grid style of this form.
*
* @type { number }
* @default -
* @syscap SystemCapability.Ability.Form

View File

@ -139,7 +139,7 @@ declare namespace formProvider {
* Get infos of all forms belonging to current bundle.
* Client to communication with FormManagerService.
*
* @param { formInfo.FormInfoFilter } filter - Indicates the requirements the forms that the formInfos belong to have to meet.
* @param { formInfo.FormInfoFilter } [filter] - Indicates the requirements the forms that the formInfos belong to have to meet.
* @returns { Promise<Array<formInfo.FormInfo>> } Returns the formInfo.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16500050 - An IPC connection error happened.
@ -191,7 +191,7 @@ declare namespace formProvider {
* Request to publish a form to the form host.
*
* @param { Want } want - The want of the form to publish.
* @param { formBindingData.FormBindingData } formBindingData - Indicates the form data.
* @param { formBindingData.FormBindingData } [formBindingData] - Indicates the form data.
* @returns { Promise<string> } Returns the form id.
* @throws { BusinessError } 202 - The application is not a system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.

View File

@ -22,26 +22,28 @@ import ConfigurationConstant from './@ohos.application.ConfigurationConstant';
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Configuration
* @useinstead ohos.app.ability.Configuration/Configuration
*/
export interface Configuration {
/**
* Indicates the current language of the application.
*
* @type { ?string }
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Configuration#language
* @useinstead ohos.app.ability.Configuration/Configuration#language
*/
language?: string;
/**
* Indicates the current colorMode of the application.
*
* @type { ?ConfigurationConstant.ColorMode }
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Configuration#colorMode
* @useinstead ohos.app.ability.Configuration/Configuration#colorMode
*/
colorMode?: ConfigurationConstant.ColorMode;
}

View File

@ -20,7 +20,7 @@
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant
* @useinstead ohos.app.ability.ConfigurationConstant/ConfigurationConstant
*/
declare namespace ConfigurationConstant {
/**
@ -30,38 +30,37 @@ declare namespace ConfigurationConstant {
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant#ColorMode
* @useinstead ohos.app.ability.ConfigurationConstant/ConfigurationConstant#ColorMode
*/
export enum ColorMode {
/**
* No color mode set.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant#COLOR_MODE_NOT_SET
*/
/**
* No color mode set.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant/ConfigurationConstant.ColorMode#COLOR_MODE_NOT_SET
*/
COLOR_MODE_NOT_SET = -1,
/**
* Dark mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant#COLOR_MODE_DARK
*/
/**
* Dark mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant/ConfigurationConstant.ColorMode#COLOR_MODE_DARK
*/
COLOR_MODE_DARK = 0,
/**
* Light mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant#COLOR_MODE_LIGHT
*/
/**
* Light mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant/ConfigurationConstant.ColorMode#COLOR_MODE_LIGHT
*/
COLOR_MODE_LIGHT = 1
}
}

View File

@ -13,7 +13,7 @@
* limitations under the License.
*/
import { CommonEventData } from "./commonEvent/commonEventData";
import { CommonEventData } from './commonEvent/commonEventData';
import StaticSubscriberExtensionContext from './@ohos.application.StaticSubscriberExtensionContext';
/**

View File

@ -19,7 +19,7 @@
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want
* @useinstead ohos.app.ability.Want/Want
*/
export default class Want {
/**
@ -29,7 +29,7 @@ export default class Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want#deviceId
* @useinstead ohos.app.ability.Want/Want#deviceId
*/
deviceId?: string;
@ -40,7 +40,7 @@ export default class Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want#bundleName
* @useinstead ohos.app.ability.Want/Want#bundleName
*/
bundleName?: string;
@ -51,7 +51,7 @@ export default class Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want#abilityName
* @useinstead ohos.app.ability.Want/Want#abilityName
*/
abilityName?: string;
@ -62,7 +62,7 @@ export default class Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want#uri
* @useinstead ohos.app.ability.Want/Want#uri
*/
uri?: string;
@ -73,7 +73,7 @@ export default class Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want#type
* @useinstead ohos.app.ability.Want/Want#type
*/
type?: string;
@ -84,7 +84,7 @@ export default class Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want#flags
* @useinstead ohos.app.ability.Want/Want#flags
*/
flags?: number;
@ -95,18 +95,18 @@ export default class Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want#action
* @useinstead ohos.app.ability.Want/Want#action
*/
action?: string;
/**
* The description of the WantParams object in an Want
*
* @type { ?[key: string]: any }
* @type { ?object }
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want#parameters
* @useinstead ohos.app.ability.Want/Want#parameters
*/
parameters?: { [key: string]: any };
@ -117,7 +117,7 @@ export default class Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want#entities
* @useinstead ohos.app.ability.Want/Want#entities
*/
entities?: Array<string>;
}

View File

@ -26,7 +26,7 @@ import { ShellCmdResult } from './application/shellCmdResult';
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityDelegatorRegistry
* @useinstead ohos.app.ability.abilityDelegatorRegistry/abilityDelegatorRegistry
*/
declare namespace abilityDelegatorRegistry {
/**
@ -36,7 +36,7 @@ declare namespace abilityDelegatorRegistry {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityDelegatorRegistry#getAbilityDelegator
* @useinstead ohos.app.ability.abilityDelegatorRegistry/abilityDelegatorRegistry#getAbilityDelegator
*/
function getAbilityDelegator(): AbilityDelegator;
@ -47,7 +47,7 @@ declare namespace abilityDelegatorRegistry {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityDelegatorRegistry#getArguments
* @useinstead ohos.app.ability.abilityDelegatorRegistry/abilityDelegatorRegistry#getArguments
*/
function getArguments(): AbilityDelegatorArgs;
@ -58,7 +58,7 @@ declare namespace abilityDelegatorRegistry {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityDelegatorRegistry#AbilityLifecycleState
* @useinstead ohos.app.ability.abilityDelegatorRegistry/abilityDelegatorRegistry#AbilityLifecycleState
*/
export enum AbilityLifecycleState {
/**
@ -67,7 +67,8 @@ declare namespace abilityDelegatorRegistry {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityDelegatorRegistry#UNINITIALIZED
* @useinstead ohos.app.ability.abilityDelegatorRegistry/abilityDelegatorRegistry.AbilityLifecycleState
* #UNINITIALIZED
*/
UNINITIALIZED,
@ -77,7 +78,7 @@ declare namespace abilityDelegatorRegistry {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityDelegatorRegistry#CREATE
* @useinstead ohos.app.ability.abilityDelegatorRegistry/abilityDelegatorRegistry.AbilityLifecycleState#CREATE
*/
CREATE,
@ -87,7 +88,7 @@ declare namespace abilityDelegatorRegistry {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityDelegatorRegistry#FOREGROUND
* @useinstead ohos.app.ability.abilityDelegatorRegistry/abilityDelegatorRegistry.AbilityLifecycleState#FOREGROUND
*/
FOREGROUND,
@ -97,7 +98,7 @@ declare namespace abilityDelegatorRegistry {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityDelegatorRegistry#BACKGROUND
* @useinstead ohos.app.ability.abilityDelegatorRegistry/abilityDelegatorRegistry.AbilityLifecycleState#BACKGROUND
*/
BACKGROUND,
@ -107,7 +108,7 @@ declare namespace abilityDelegatorRegistry {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityDelegatorRegistry#DESTROY
* @useinstead ohos.app.ability.abilityDelegatorRegistry/abilityDelegatorRegistry.AbilityLifecycleState#DESTROY
*/
DESTROY
}

View File

@ -27,7 +27,7 @@ import { ElementName } from './bundle/elementName';
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityManager
* @useinstead ohos.app.ability.abilityManager/abilityManager
*/
declare namespace abilityManager {
/**
@ -38,7 +38,7 @@ declare namespace abilityManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityManager#AbilityState
* @useinstead ohos.app.ability.abilityManager/abilityManager#AbilityState
*/
export enum AbilityState {
/**
@ -48,7 +48,7 @@ declare namespace abilityManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityManager#INITIAL
* @useinstead ohos.app.ability.abilityManager/abilityManager.AbilityState#INITIAL
*/
INITIAL = 0,
@ -59,7 +59,7 @@ declare namespace abilityManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityManager#FOREGROUND
* @useinstead ohos.app.ability.abilityManager/abilityManager.AbilityState#FOREGROUND
*/
FOREGROUND = 9,
@ -70,7 +70,7 @@ declare namespace abilityManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityManager#BACKGROUND
* @useinstead ohos.app.ability.abilityManager/abilityManager.AbilityState#BACKGROUND
*/
BACKGROUND = 10,
@ -81,7 +81,7 @@ declare namespace abilityManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityManager#FOREGROUNDING
* @useinstead ohos.app.ability.abilityManager/abilityManager.AbilityState#FOREGROUNDING
*/
FOREGROUNDING = 11,
@ -92,7 +92,7 @@ declare namespace abilityManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityManager#BACKGROUNDING
* @useinstead ohos.app.ability.abilityManager/abilityManager.AbilityState#BACKGROUNDING
*/
BACKGROUNDING = 12
}
@ -107,7 +107,7 @@ declare namespace abilityManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityManager#updateConfiguration
* @useinstead ohos.app.ability.abilityManager/abilityManager#updateConfiguration
*/
function updateConfiguration(config: Configuration, callback: AsyncCallback<void>): void;
@ -121,7 +121,7 @@ declare namespace abilityManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityManager#updateConfiguration
* @useinstead ohos.app.ability.abilityManager/abilityManager#updateConfiguration
*/
function updateConfiguration(config: Configuration): Promise<void>;
@ -134,7 +134,7 @@ declare namespace abilityManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityManager#getAbilityRunningInfos
* @useinstead ohos.app.ability.abilityManager/abilityManager#getAbilityRunningInfos
*/
function getAbilityRunningInfos(): Promise<Array<AbilityRunningInfo>>;
@ -147,7 +147,7 @@ declare namespace abilityManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.abilityManager#getAbilityRunningInfos
* @useinstead ohos.app.ability.abilityManager/abilityManager#getAbilityRunningInfos
*/
function getAbilityRunningInfos(callback: AsyncCallback<Array<AbilityRunningInfo>>): void;
}

View File

@ -26,7 +26,7 @@ import { ProcessRunningInfo } from './application/ProcessRunningInfo';
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager
* @useinstead ohos.app.ability.appManager/appManager
*/
declare namespace appManager {
/**
@ -39,7 +39,7 @@ declare namespace appManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#on
* @useinstead ohos.app.ability.appManager/appManager#on
*/
function registerApplicationStateObserver(observer: ApplicationStateObserver): number;
@ -53,7 +53,7 @@ declare namespace appManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#off
* @useinstead ohos.app.ability.appManager/appManager#off
*/
function unregisterApplicationStateObserver(observerId: number, callback: AsyncCallback<void>): void;
@ -67,7 +67,7 @@ declare namespace appManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#off
* @useinstead ohos.app.ability.appManager/appManager#off
*/
function unregisterApplicationStateObserver(observerId: number): Promise<void>;
@ -81,7 +81,7 @@ declare namespace appManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#getForegroundApplications
* @useinstead ohos.app.ability.appManager/appManager#getForegroundApplications
*/
function getForegroundApplications(callback: AsyncCallback<Array<AppStateData>>): void;
@ -94,7 +94,7 @@ declare namespace appManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#getForegroundApplications
* @useinstead ohos.app.ability.appManager/appManager#getForegroundApplications
*/
function getForegroundApplications(): Promise<Array<AppStateData>>;
@ -109,7 +109,7 @@ declare namespace appManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#killProcessWithAccount
* @useinstead ohos.app.ability.appManager/appManager#killProcessWithAccount
*/
function killProcessWithAccount(bundleName: string, accountId: number): Promise<void>;
@ -124,7 +124,7 @@ declare namespace appManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#killProcessWithAccount
* @useinstead ohos.app.ability.appManager/appManager#killProcessWithAccount
*/
function killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCallback<void>): void;
@ -135,7 +135,7 @@ declare namespace appManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#isRunningInStabilityTest
* @useinstead ohos.app.ability.appManager/appManager#isRunningInStabilityTest
*/
function isRunningInStabilityTest(callback: AsyncCallback<boolean>): void;
@ -146,7 +146,7 @@ declare namespace appManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#isRunningInStabilityTest
* @useinstead ohos.app.ability.appManager/appManager#isRunningInStabilityTest
*/
function isRunningInStabilityTest(): Promise<boolean>;
@ -158,7 +158,7 @@ declare namespace appManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#getRunningProcessInformation
* @useinstead ohos.app.ability.appManager/appManager#getRunningProcessInformation
*/
function getProcessRunningInfos(): Promise<Array<ProcessRunningInfo>>;
@ -171,7 +171,7 @@ declare namespace appManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#getRunningProcessInformation
* @useinstead ohos.app.ability.appManager/appManager#getRunningProcessInformation
*/
function getProcessRunningInfos(): Promise<Array<ProcessRunningInfo>>;
@ -183,7 +183,7 @@ declare namespace appManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#getRunningProcessInformation
* @useinstead ohos.app.ability.appManager/appManager#getRunningProcessInformation
*/
function getProcessRunningInfos(callback: AsyncCallback<Array<ProcessRunningInfo>>): void;
@ -197,7 +197,7 @@ declare namespace appManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#killProcessesByBundleName
* @useinstead ohos.app.ability.appManager/appManager#killProcessesByBundleName
*/
function killProcessesByBundleName(bundleName: string): Promise<void>;
@ -211,7 +211,7 @@ declare namespace appManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#killProcessesByBundleName
* @useinstead ohos.app.ability.appManager/appManager#killProcessesByBundleName
*/
function killProcessesByBundleName(bundleName: string, callback: AsyncCallback<void>);
@ -225,7 +225,7 @@ declare namespace appManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#clearUpApplicationData
* @useinstead ohos.app.ability.appManager/appManager#clearUpApplicationData
*/
function clearUpApplicationData(bundleName: string): Promise<void>;
@ -239,7 +239,7 @@ declare namespace appManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#clearUpApplicationData
* @useinstead ohos.app.ability.appManager/appManager#clearUpApplicationData
*/
function clearUpApplicationData(bundleName: string, callback: AsyncCallback<void>);
@ -250,7 +250,7 @@ declare namespace appManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#isRamConstrainedDevice
* @useinstead ohos.app.ability.appManager/appManager#isRamConstrainedDevice
*/
function isRamConstrainedDevice(): Promise<boolean>;
@ -261,7 +261,7 @@ declare namespace appManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#isRamConstrainedDevice
* @useinstead ohos.app.ability.appManager/appManager#isRamConstrainedDevice
*/
function isRamConstrainedDevice(callback: AsyncCallback<boolean>): void;
@ -272,7 +272,7 @@ declare namespace appManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#getAppMemorySize
* @useinstead ohos.app.ability.appManager/appManager#getAppMemorySize
*/
function getAppMemorySize(): Promise<number>;
@ -283,7 +283,7 @@ declare namespace appManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.appManager#getAppMemorySize
* @useinstead ohos.app.ability.appManager/appManager#getAppMemorySize
*/
function getAppMemorySize(callback: AsyncCallback<number>): void;
}

View File

@ -20,18 +20,18 @@
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formBindingData
* @useinstead ohos.app.form.formBindingData/formBindingData
*/
declare namespace formBindingData {
/**
* Create an FormBindingData instance.
*
* @param { Object | string } obj Indicates the FormBindingData instance data.
* @param { Object | string } [obj] Indicates the FormBindingData instance data.
* @returns { FormBindingData } Returns the {@link FormBindingData} instance.
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formBindingData#createFormBindingData
* @useinstead ohos.app.form.formBindingData/formBindingData#createFormBindingData
*/
function createFormBindingData(obj?: Object | string): FormBindingData;
@ -42,8 +42,19 @@ declare namespace formBindingData {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formBindingData/formBindingData#FormBindingData
*/
interface FormBindingData {
/**
* The data to be displayed on the js card. Can be a string in Object or json format that
* contains several key-value pairs.
*
* @type { Object }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formBindingData/formBindingData#FormBindingData
*/
data: Object;
}
}

View File

@ -26,7 +26,7 @@ import formInfo from './@ohos.app.form.formInfo';
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost
* @useinstead ohos.app.form.formHost/formHost
*/
declare namespace formHost {
/**
@ -42,7 +42,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#deleteForm
* @useinstead ohos.app.form.formHost/formHost#deleteForm
*/
function deleteForm(formId: string, callback: AsyncCallback<void>): void;
@ -58,7 +58,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#deleteForm
* @useinstead ohos.app.form.formHost/formHost#deleteForm
*/
function deleteForm(formId: string): Promise<void>;
@ -76,7 +76,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#releaseForm
* @useinstead ohos.app.form.formHost/formHost#releaseForm
*/
function releaseForm(formId: string, callback: AsyncCallback<void>): void;
@ -95,7 +95,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#releaseForm
* @useinstead ohos.app.form.formHost/formHost#releaseForm
*/
function releaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback<void>): void;
@ -107,13 +107,13 @@ declare namespace formHost {
*
* @permission ohos.permission.REQUIRE_FORM
* @param { string } formId Indicates the form ID
* @param { boolean } isReleaseCache Indicates whether or not release cache
* @param { boolean } [isReleaseCache] Indicates whether or not release cache
* @returns { Promise<void> } The promise returned by the function.
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#releaseForm
* @useinstead ohos.app.form.formHost/formHost#releaseForm
*/
function releaseForm(formId: string, isReleaseCache?: boolean): Promise<void>;
@ -132,7 +132,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#requestForm
* @useinstead ohos.app.form.formHost/formHost#requestForm
*/
function requestForm(formId: string, callback: AsyncCallback<void>): void;
@ -150,7 +150,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#requestForm
* @useinstead ohos.app.form.formHost/formHost#requestForm
*/
function requestForm(formId: string): Promise<void>;
@ -166,7 +166,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#castTempForm
* @useinstead ohos.app.form.formHost/formHost#castTempForm
*/
function castTempForm(formId: string, callback: AsyncCallback<void>): void;
@ -180,7 +180,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#castTempForm
* @useinstead ohos.app.form.formHost/formHost#castTempForm
*/
function castTempForm(formId: string): Promise<void>;
@ -198,7 +198,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#notifyVisibleForms
* @useinstead ohos.app.form.formHost/formHost#notifyVisibleForms
*/
function notifyVisibleForms(formIds: Array<string>, callback: AsyncCallback<void>): void;
@ -214,7 +214,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#notifyVisibleForms
* @useinstead ohos.app.form.formHost/formHost#notifyVisibleForms
*/
function notifyVisibleForms(formIds: Array<string>): Promise<void>;
@ -232,7 +232,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#notifyInvisibleForms
* @useinstead ohos.app.form.formHost/formHost#notifyInvisibleForms
*/
function notifyInvisibleForms(formIds: Array<string>, callback: AsyncCallback<void>): void;
@ -248,7 +248,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#notifyInvisibleForms
* @useinstead ohos.app.form.formHost/formHost#notifyInvisibleForms
*/
function notifyInvisibleForms(formIds: Array<string>): Promise<void>;
@ -266,7 +266,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#enableFormsUpdate
* @useinstead ohos.app.form.formHost/formHost#enableFormsUpdate
*/
function enableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void>): void;
@ -282,7 +282,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#enableFormsUpdate
* @useinstead ohos.app.form.formHost/formHost#enableFormsUpdate
*/
function enableFormsUpdate(formIds: Array<string>): Promise<void>;
@ -300,7 +300,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#disableFormsUpdate
* @useinstead ohos.app.form.formHost/formHost#disableFormsUpdate
*/
function disableFormsUpdate(formIds: Array<string>, callback: AsyncCallback<void>): void;
@ -316,7 +316,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#disableFormsUpdate
* @useinstead ohos.app.form.formHost/formHost#disableFormsUpdate
*/
function disableFormsUpdate(formIds: Array<string>): Promise<void>;
@ -330,7 +330,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#isSystemReady
* @useinstead ohos.app.form.formHost/formHost#isSystemReady
*/
function isSystemReady(callback: AsyncCallback<void>): void;
@ -343,7 +343,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#isSystemReady
* @useinstead ohos.app.form.formHost/formHost#isSystemReady
*/
function isSystemReady(): Promise<void>;
@ -359,7 +359,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#getAllFormsInfo
* @useinstead ohos.app.form.formHost/formHost#getAllFormsInfo
*/
function getAllFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
@ -372,7 +372,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#getAllFormsInfo
* @useinstead ohos.app.form.formHost/formHost#getAllFormsInfo
*/
function getAllFormsInfo(): Promise<Array<formInfo.FormInfo>>;
@ -389,7 +389,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#getFormsInfo
* @useinstead ohos.app.form.formHost/formHost#getFormsInfo
*/
function getFormsInfo(bundleName: string, callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
@ -407,7 +407,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#getFormsInfo
* @useinstead ohos.app.form.formHost/formHost#getFormsInfo
*/
function getFormsInfo(
bundleName: string,
@ -420,13 +420,13 @@ declare namespace formHost {
*
* @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
* @param { string } bundleName Indicates the bundle name of the application.
* @param { string } moduleName Indicates the module name of the application.
* @param { string } [moduleName] Indicates the module name of the application.
* @returns { Promise<Array<formInfo.FormInfo>> } Returns the {@link FormInfo}
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#getFormsInfo
* @useinstead ohos.app.form.formHost/formHost#getFormsInfo
*/
function getFormsInfo(bundleName: string, moduleName?: string): Promise<Array<formInfo.FormInfo>>;
@ -444,7 +444,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#deleteInvalidForms
* @useinstead ohos.app.form.formHost/formHost#deleteInvalidForms
*/
function deleteInvalidForms(formIds: Array<string>, callback: AsyncCallback<number>): void;
@ -459,7 +459,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#deleteInvalidForms
* @useinstead ohos.app.form.formHost/formHost#deleteInvalidForms
*/
function deleteInvalidForms(formIds: Array<string>): Promise<number>;
@ -477,7 +477,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#acquireFormState
* @useinstead ohos.app.form.formHost/formHost#acquireFormState
*/
function acquireFormState(want: Want, callback: AsyncCallback<formInfo.FormStateInfo>): void;
@ -492,7 +492,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#acquireFormState
* @useinstead ohos.app.form.formHost/formHost#acquireFormState
*/
function acquireFormState(want: Want): Promise<formInfo.FormStateInfo>;
@ -507,7 +507,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#on
* @useinstead ohos.app.form.formHost/formHost#on
*/
function on(type: 'formUninstall', callback: Callback<string>): void;
@ -516,15 +516,15 @@ declare namespace formHost {
* <p>You can use this method to cancel listening to the event of uninstall form.</p>
*
* @param { 'formUninstall' } type Indicates event type.
* @param { Callback<string> } callback Callback function that returns the card identifier. By default, it
* indicates the cancellation of all registered event callbacks, which
* must be consistent with the corresponding
* callback for on('formUninstall').
* @param { Callback<string> } [callback] Callback function that returns the card identifier. By default, it
* indicates the cancellation of all registered event callbacks, which
* must be consistent with the corresponding
* callback for on('formUninstall').
* @syscap SystemCapability.Ability.Form
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#off
* @useinstead ohos.app.form.formHost/formHost#off
*/
function off(type: 'formUninstall', callback?: Callback<string>): void;
@ -541,7 +541,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#notifyFormsVisible
* @useinstead ohos.app.form.formHost/formHost#notifyFormsVisible
*/
function notifyFormsVisible(formIds: Array<string>, isVisible: boolean, callback: AsyncCallback<void>): void;
@ -557,7 +557,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#notifyFormsVisible
* @useinstead ohos.app.form.formHost/formHost#notifyFormsVisible
*/
function notifyFormsVisible(formIds: Array<string>, isVisible: boolean): Promise<void>;
@ -574,7 +574,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#notifyFormsEnableUpdate
* @useinstead ohos.app.form.formHost/formHost#notifyFormsEnableUpdate
*/
function notifyFormsEnableUpdate(
formIds: Array<string>,
@ -594,7 +594,7 @@ declare namespace formHost {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formHost#notifyFormsEnableUpdate
* @useinstead ohos.app.form.formHost/formHost#notifyFormsEnableUpdate
*/
function notifyFormsEnableUpdate(formIds: Array<string>, isEnableUpdate: boolean): Promise<void>;
}

View File

@ -22,7 +22,7 @@ import Want from './@ohos.app.ability.Want';
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo
* @useinstead ohos.app.form.formInfo/formInfo
*/
declare namespace formInfo {
/**
@ -32,122 +32,134 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#FormInfo
* @useinstead ohos.app.form.formInfo/formInfo#FormInfo
*/
interface FormInfo {
/**
* Obtains the bundle name of the application to which this form belongs.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#bundleName
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#bundleName
*/
bundleName: string;
/**
* Obtains the name of the application module to which this form belongs.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#moduleName
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#moduleName
*/
moduleName: string;
/**
* Obtains the class name of the ability to which this form belongs.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#abilityName
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#abilityName
*/
abilityName: string;
/**
* Obtains the name of this form.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#name
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#name
*/
name: string;
/**
* Obtains the name of this form.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#description
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#description
*/
description: string;
/**
* Obtains the type of this form. Currently, JS forms are supported.
*
* @type { FormType }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#type
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#type
*/
type: FormType;
/**
* Obtains the JS component name of this JS form.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#jsComponentName
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#jsComponentName
*/
jsComponentName: string;
/**
* Obtains the color mode of this form.
*
* @type { ColorMode }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#colorMode
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#colorMode
*/
colorMode: ColorMode;
/**
* Checks whether this form is a default form.
*
* @type { boolean }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#isDefault
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#isDefault
*/
isDefault: boolean;
/**
* Obtains the updateEnabled.
*
* @type { boolean }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#updateEnabled
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#updateEnabled
*/
updateEnabled: boolean;
/**
* Obtains whether notify visible of this form.
*
* @type { boolean }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#formVisibleNotify
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#formVisibleNotify
*/
formVisibleNotify: boolean;
/**
* Obtains the bundle relatedBundleName of the application to which this form belongs.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
@ -157,60 +169,66 @@ declare namespace formInfo {
/**
* Obtains the scheduledUpdateTime.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#scheduledUpdateTime
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#scheduledUpdateTime
*/
scheduledUpdateTime: string;
/**
* Obtains the form config ability about this form.
*
* @type { string }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#formConfigAbility
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#formConfigAbility
*/
formConfigAbility: string;
/**
* Obtains the updateDuration.
*
* @type { number }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#updateDuration
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#updateDuration
*/
updateDuration: number;
/**
* Obtains the default grid style of this form.
*
* @type { number }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#defaultDimension
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#defaultDimension
*/
defaultDimension: number;
/**
* Obtains the grid styles supported by this form.
*
* @type { Array<number> }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#supportDimensions
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#supportDimensions
*/
supportDimensions: Array<number>;
/**
* Obtains the custom data defined in this form.
*
* @type { object }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#customizeData
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#customizeData
*/
customizeData: { [key: string]: [value: string] };
}
@ -222,7 +240,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#FormType
* @useinstead ohos.app.form.formInfo/formInfo#FormType
*/
enum FormType {
/**
@ -231,7 +249,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#JS
* @useinstead ohos.app.form.formInfo/formInfo.FormType#JS
*/
JS = 1
}
@ -243,7 +261,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#ColorMode
* @useinstead ohos.app.form.formInfo/formInfo#ColorMode
*/
enum ColorMode {
/**
@ -252,7 +270,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#MODE_AUTO
* @useinstead ohos.app.form.formInfo/formInfo.ColorMode#MODE_AUTO
*/
MODE_AUTO = -1,
@ -262,7 +280,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#MODE_DARK
* @useinstead ohos.app.form.formInfo/formInfo.ColorMode#MODE_DARK
*/
MODE_DARK = 0,
@ -272,7 +290,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#MODE_LIGHT
* @useinstead ohos.app.form.formInfo/formInfo.ColorMode#MODE_LIGHT
*/
MODE_LIGHT = 1
}
@ -284,26 +302,28 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#FormStateInfo
* @useinstead ohos.app.form.formInfo/formInfo#FormStateInfo
*/
interface FormStateInfo {
/**
* Obtains the form state.
*
* @type { FormState }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#formState
* @useinstead ohos.app.form.formInfo/formInfo.FormStateInfo#formState
*/
formState: FormState;
/**
* Obtains the want form .
*
* @type { Want }
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#want
* @useinstead ohos.app.form.formInfo/formInfo.FormStateInfo#want
*/
want: Want;
}
@ -315,7 +335,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#FormState
* @useinstead ohos.app.form.formInfo/formInfo#FormState
*/
enum FormState {
/**
@ -324,7 +344,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#UNKNOWN
* @useinstead ohos.app.form.formInfo/formInfo.FormState#UNKNOWN
*/
UNKNOWN = -1,
@ -334,7 +354,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#DEFAULT
* @useinstead ohos.app.form.formInfo/formInfo.FormState#DEFAULT
*/
DEFAULT = 0,
@ -344,7 +364,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#READY
* @useinstead ohos.app.form.formInfo/formInfo.FormState#READY
*/
READY = 1
}
@ -356,7 +376,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#FormParam
* @useinstead ohos.app.form.formInfo/formInfo#FormParam
*/
enum FormParam {
/**
@ -371,7 +391,7 @@ declare namespace formInfo {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#IDENTITY_KEY
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#IDENTITY_KEY
*/
IDENTITY_KEY = 'ohos.extra.param.key.form_identity',
@ -386,7 +406,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#DIMENSION_KEY
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#DIMENSION_KEY
*/
DIMENSION_KEY = 'ohos.extra.param.key.form_dimension',
@ -401,7 +421,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#NAME_KEY
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#NAME_KEY
*/
NAME_KEY = 'ohos.extra.param.key.form_name',
@ -418,7 +438,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#MODULE_NAME_KEY
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#MODULE_NAME_KEY
*/
MODULE_NAME_KEY = 'ohos.extra.param.key.module_name',
@ -433,7 +453,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#WIDTH_KEY
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#WIDTH_KEY
*/
WIDTH_KEY = 'ohos.extra.param.key.form_width',
@ -448,7 +468,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#HEIGHT_KEY
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#HEIGHT_KEY
*/
HEIGHT_KEY = 'ohos.extra.param.key.form_height',
@ -463,7 +483,7 @@ declare namespace formInfo {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo#TEMPORARY_KEY
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#TEMPORARY_KEY
*/
TEMPORARY_KEY = 'ohos.extra.param.key.form_temporary'
}

View File

@ -25,7 +25,7 @@ import Want from './@ohos.app.ability.Want';
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formProvider
* @useinstead ohos.app.form.formProvider/formProvider
*/
declare namespace formProvider {
/**
@ -37,7 +37,7 @@ declare namespace formProvider {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formProvider#setFormNextRefreshTime
* @useinstead ohos.app.form.formProvider/formProvider#setFormNextRefreshTime
*/
function setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback<void>): void;
@ -50,7 +50,7 @@ declare namespace formProvider {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formProvider#setFormNextRefreshTime
* @useinstead ohos.app.form.formProvider/formProvider#setFormNextRefreshTime
*/
function setFormNextRefreshTime(formId: string, minute: number): Promise<void>;
@ -64,7 +64,7 @@ declare namespace formProvider {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formProvider#updateForm
* @useinstead ohos.app.form.formProvider/formProvider#updateForm
*/
function updateForm(
formId: string,
@ -82,7 +82,7 @@ declare namespace formProvider {
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formProvider#updateForm
* @useinstead ohos.app.form.formProvider/formProvider#updateForm
*/
function updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise<void>;
}

View File

@ -28,7 +28,7 @@ import StartOptions from './@ohos.app.ability.StartOptions';
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager
* @useinstead ohos.app.ability.missionManager/missionManager
*/
declare namespace missionManager {
/**
@ -41,7 +41,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#on
* @useinstead ohos.app.ability.missionManager/missionManager#on
*/
function registerMissionListener(listener: MissionListener): number;
@ -55,7 +55,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#off
* @useinstead ohos.app.ability.missionManager/missionManager#off
*/
function unregisterMissionListener(listenerId: number, callback: AsyncCallback<void>): void;
@ -69,7 +69,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#off
* @useinstead ohos.app.ability.missionManager/missionManager#off
*/
function unregisterMissionListener(listenerId: number): Promise<void>;
@ -84,7 +84,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#getMissionInfo
* @useinstead ohos.app.ability.missionManager/missionManager#getMissionInfo
*/
function getMissionInfo(deviceId: string, missionId: number, callback: AsyncCallback<MissionInfo>): void;
@ -99,7 +99,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#getMissionInfo
* @useinstead ohos.app.ability.missionManager/missionManager#getMissionInfo
*/
function getMissionInfo(deviceId: string, missionId: number): Promise<MissionInfo>;
@ -115,7 +115,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#getMissionInfos
* @useinstead ohos.app.ability.missionManager/missionManager#getMissionInfos
*/
function getMissionInfos(deviceId: string, numMax: number, callback: AsyncCallback<Array<MissionInfo>>): void;
@ -130,7 +130,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#getMissionInfos
* @useinstead ohos.app.ability.missionManager/missionManager#getMissionInfos
*/
function getMissionInfos(deviceId: string, numMax: number): Promise<Array<MissionInfo>>;
@ -146,7 +146,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#getMissionSnapShot
* @useinstead ohos.app.ability.missionManager/missionManager#getMissionSnapShot
*/
function getMissionSnapShot(deviceId: string, missionId: number, callback: AsyncCallback<MissionSnapshot>): void;
@ -161,7 +161,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#getMissionSnapShot
* @useinstead ohos.app.ability.missionManager/missionManager#getMissionSnapShot
*/
function getMissionSnapShot(deviceId: string, missionId: number): Promise<MissionSnapshot>;
@ -175,7 +175,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#lockMission
* @useinstead ohos.app.ability.missionManager/missionManager#lockMission
*/
function lockMission(missionId: number, callback: AsyncCallback<void>): void;
@ -189,7 +189,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#lockMission
* @useinstead ohos.app.ability.missionManager/missionManager#lockMission
*/
function lockMission(missionId: number): Promise<void>;
@ -203,7 +203,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#unlockMission
* @useinstead ohos.app.ability.missionManager/missionManager#unlockMission
*/
function unlockMission(missionId: number, callback: AsyncCallback<void>): void;
@ -217,7 +217,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#unlockMission
* @useinstead ohos.app.ability.missionManager/missionManager#unlockMission
*/
function unlockMission(missionId: number): Promise<void>;
@ -231,7 +231,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#clearMission
* @useinstead ohos.app.ability.missionManager/missionManager#clearMission
*/
function clearMission(missionId: number, callback: AsyncCallback<void>): void;
@ -245,7 +245,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#clearMission
* @useinstead ohos.app.ability.missionManager/missionManager#clearMission
*/
function clearMission(missionId: number): Promise<void>;
@ -258,7 +258,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#clearAllMissions
* @useinstead ohos.app.ability.missionManager/missionManager#clearAllMissions
*/
function clearAllMissions(callback: AsyncCallback<void>): void;
@ -271,7 +271,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#clearAllMissions
* @useinstead ohos.app.ability.missionManager/missionManager#clearAllMissions
*/
function clearAllMissions(): Promise<void>;
@ -285,7 +285,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#moveMissionToFront
* @useinstead ohos.app.ability.missionManager/missionManager#moveMissionToFront
*/
function moveMissionToFront(missionId: number, callback: AsyncCallback<void>): void;
@ -300,7 +300,7 @@ declare namespace missionManager {
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#moveMissionToFront
* @useinstead ohos.app.ability.missionManager/missionManager#moveMissionToFront
*/
function moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCallback<void>): void;
@ -309,13 +309,13 @@ declare namespace missionManager {
*
* @permission ohos.permission.MANAGE_MISSIONS
* @param { number } missionId Indicates mission id to be moved to foreground.
* @param { StartOptions } options Indicates the start options.
* @param { StartOptions } [options] Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.missionManager#moveMissionToFront
* @useinstead ohos.app.ability.missionManager/missionManager#moveMissionToFront
*/
function moveMissionToFront(missionId: number, options?: StartOptions): Promise<void>;
}

File diff suppressed because it is too large Load Diff

View File

@ -146,7 +146,7 @@ declare namespace commonEventManager {
* Unsubscribe from an ordered, sticky, or standard common event.
*
* @param { CommonEventSubscriber } subscriber - Indicate the subscriber of the common event.
* @param { AsyncCallback<void> } callback - The callback of unsubscribe.
* @param { AsyncCallback<void> } [callback] - The callback of unsubscribe.
* @throws { BusinessError } 401 - parameter error
* @throws { BusinessError } 801 - capability not supported
* @throws { BusinessError } 1500007 - error sending message to Common Event Service
@ -194,6 +194,7 @@ declare namespace commonEventManager {
/**
* Set static subscriber state.
*
* @param { boolean } enable - static subscribe event enable/disable state.
* @param { AsyncCallback<void> } callback - Specified callback method.
* @throws { BusinessError } 202 - not system app
@ -209,6 +210,7 @@ declare namespace commonEventManager {
/**
* Set static subscriber state.
*
* @param { boolean } enable - static subscribe event enable/disable state.
* @returns { Promise<void> }
* @throws { BusinessError } 202 - not system app
@ -1146,7 +1148,7 @@ declare namespace commonEventManager {
* @systemapi
* @since 10
*/
COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED = "usual.event.DEVICE_IDLE_EXEMPTION_LIST_UPDATED",
COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED = 'usual.event.DEVICE_IDLE_EXEMPTION_LIST_UPDATED',
/**
* Sent when device's power save mode changed
@ -1536,7 +1538,7 @@ declare namespace commonEventManager {
* @syscap SystemCapability.Notification.CommonEvent
* @since 10
*/
COMMON_EVENT_QUICK_FIX_REVOKE_RESULT = "usual.event.QUICK_FIX_REVOKE_RESULT",
COMMON_EVENT_QUICK_FIX_REVOKE_RESULT = 'usual.event.QUICK_FIX_REVOKE_RESULT',
/**
* Indicate the action of a common event that the user information has been updated.
@ -1773,7 +1775,7 @@ declare namespace commonEventManager {
* @systemapi
* @since 10
*/
COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED = "usual.event.DOMAIN_ACCOUNT_STATUS_CHANGED",
COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED = 'usual.event.DOMAIN_ACCOUNT_STATUS_CHANGED',
/**
* This commonEvent means when the screen is unlocked.

View File

@ -113,7 +113,7 @@ declare namespace continuationManager {
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager#on
* @useinstead ohos.continuation.continuationManager/continuationManager#on
*/
function on(type: 'deviceConnect', callback: Callback<ContinuationResult>): void;
@ -122,13 +122,13 @@ declare namespace continuationManager {
* You can implement your own processing logic in this callback to initiate the hop process.
*
* @param { 'deviceConnect' } type deviceConnect.
* @param { Callback<ContinuationResult> } callback Called when the user selects a device from the device selection
* module, returning the device ID,device type, and device name for
* developers to use.
* @param { Callback<ContinuationResult> } [callback] Called when the user selects a device from the device selection
* module, returning the device ID,device type, and device name for
* developers to use.
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager#off
* @useinstead ohos.continuation.continuationManager/continuationManager#off
*/
function off(type: 'deviceConnect', callback?: Callback<ContinuationResult>): void;
@ -142,7 +142,7 @@ declare namespace continuationManager {
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager#on
* @useinstead ohos.continuation.continuationManager/continuationManager#on
*/
function on(type: 'deviceDisconnect', callback: Callback<string>): void;
@ -151,12 +151,12 @@ declare namespace continuationManager {
* You can implement your own processing logic in this callback, such as notifying the user of the disconnection.
*
* @param { 'deviceDisconnect' } type deviceDisconnect.
* @param { Callback<string> } callback Called when the user selects a device from the device selection module,
* returning the device ID,device type, and device name for developers to use.
* @param { Callback<string> } [callback] Called when the user selects a device from the device selection module,
* returning the device ID,device type, and device name for developers to use.
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager#off
* @useinstead ohos.continuation.continuationManager/continuationManager#off
*/
function off(type: 'deviceDisconnect', callback?: Callback<string>): void;
@ -169,7 +169,7 @@ declare namespace continuationManager {
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager.continuationManager#registerContinuation
* @useinstead ohos.continuation.continuationManager/continuationManager#registerContinuation
*/
function register(callback: AsyncCallback<number>): void;
@ -184,7 +184,7 @@ declare namespace continuationManager {
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager.continuationManager#registerContinuation
* @useinstead ohos.continuation.continuationManager/continuationManager#registerContinuation
*/
function register(options: ContinuationExtraParams, callback: AsyncCallback<number>): void;
@ -192,14 +192,14 @@ declare namespace continuationManager {
* Registers an ability to be hopped with the continuation manager service and obtains the registration token
* assigned to the ability.
*
* @param { ContinuationExtraParams } options Indicates the {@link ExtraParams} object containing the extra
* parameters used to filter the list of available devices.
* @param { ContinuationExtraParams } [options] Indicates the {@link ExtraParams} object containing the extra
* parameters used to filter the list of available devices.
* @returns { Promise<number> } callback Indicates the callback to be invoked when the continuation manager service
* is connected.
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager.continuationManager#registerContinuation
* @useinstead ohos.continuation.continuationManager/continuationManager#registerContinuation
*/
function register(options?: ContinuationExtraParams): Promise<number>;
@ -212,7 +212,7 @@ declare namespace continuationManager {
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager.continuationManager#unregisterContinuation
* @useinstead ohos.continuation.continuationManager/continuationManager#unregisterContinuation
*/
function unregister(token: number, callback: AsyncCallback<void>): void;
@ -226,7 +226,7 @@ declare namespace continuationManager {
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager.continuationManager#unregisterContinuation
* @useinstead ohos.continuation.continuationManager/continuationManager#unregisterContinuation
*/
function unregister(token: number): Promise<void>;
@ -240,7 +240,7 @@ declare namespace continuationManager {
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager.continuationManager#updateContinuationState
* @useinstead ohos.continuation.continuationManager/continuationManager#updateContinuationState
*/
function updateConnectStatus(
token: number,
@ -260,7 +260,7 @@ declare namespace continuationManager {
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager.continuationManager#updateContinuationState
* @useinstead ohos.continuation.continuationManager/continuationManager#updateContinuationState
*/
function updateConnectStatus(token: number, deviceId: string, status: DeviceConnectState): Promise<void>;
@ -272,7 +272,7 @@ declare namespace continuationManager {
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager.continuationManager#startContinuationDeviceManager
* @useinstead ohos.continuation.continuationManager/continuationManager#startContinuationDeviceManager
*/
function startDeviceManager(token: number, callback: AsyncCallback<void>): void;
@ -286,7 +286,7 @@ declare namespace continuationManager {
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager.continuationManager#startContinuationDeviceManager
* @useinstead ohos.continuation.continuationManager/continuationManager#startContinuationDeviceManager
*/
function startDeviceManager(token: number, options: ContinuationExtraParams, callback: AsyncCallback<void>): void;
@ -294,14 +294,14 @@ declare namespace continuationManager {
* Start to manage the devices that can be selected for continuation.
*
* @param { number } token Indicates the registration token of the ability.
* @param { ContinuationExtraParams } options Indicates the extraParams object containing the extra parameters
* used to filter the list of available devices. This parameter is null.
* @param { ContinuationExtraParams } [options] Indicates the extraParams object containing the extra parameters
* used to filter the list of available devices. This parameter is null.
* @returns { Promise<void> } callback Indicates the callback to be invoked when the continuation manager service
* is connected.
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
* @deprecated since 9
* @useinstead ohos.continuation.continuationManager.continuationManager#startContinuationDeviceManager
* @useinstead ohos.continuation.continuationManager/continuationManager#startContinuationDeviceManager
*/
function startDeviceManager(token: number, options?: ContinuationExtraParams): Promise<void>;
@ -344,7 +344,7 @@ declare namespace continuationManager {
* assigned to the ability.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { ContinuationExtraParams } options Indicates the {@link ExtraParams} object containing the extra parameters
* @param { ContinuationExtraParams } [options] Indicates the {@link ExtraParams} object containing the extra parameters
* used to filter the list of available devices.
* @returns { Promise<number> } callback Indicates the callback to be invoked when the continuation manager
* service is connected.
@ -471,7 +471,7 @@ declare namespace continuationManager {
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { number } token Indicates the registration token of the ability.
* @param { ContinuationExtraParams } options Indicates extraParams object containing extra parameters used to filter
* @param { ContinuationExtraParams } [options] Indicates extraParams object containing extra parameters used to filter
* the list of available devices. This parameter can be null.
* @returns { Promise<void> } callback Indicates the callback to be invoked when continuation manager service is connected.
* @throws { BusinessError } 201 - Permission denied.
@ -498,7 +498,7 @@ declare namespace continuationManager {
* @since 8
*/
IDLE = 0,
/**
* Device connection status.
*
@ -506,7 +506,7 @@ declare namespace continuationManager {
* @since 8
*/
CONNECTING = 1,
/**
* The device is connected.
*
@ -514,7 +514,7 @@ declare namespace continuationManager {
* @since 8
*/
CONNECTED = 2,
/**
* The device is disconnected.
*

File diff suppressed because it is too large Load Diff

View File

@ -223,7 +223,7 @@ declare namespace notificationManager {
* Cancel a notification with the specified label and ID.
*
* @param { number } id - ID of the notification to cancel, which must be unique in the application.
* @param { string } label - Label of the notification to cancel.
* @param { string } [label] - Label of the notification to cancel.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
@ -1669,7 +1669,8 @@ declare namespace notificationManager {
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
* @param { 'checkNotification' } type - Type of the callback to listen for.
* @param { (checkInfo: NotificationCheckInfo) => NotificationCheckResult } callback - callback - The callback of check notifications.
* @param { (checkInfo: NotificationCheckInfo) => NotificationCheckResult } [callback] - callback - The callback
* of check notifications.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
@ -1677,7 +1678,10 @@ declare namespace notificationManager {
* @systemapi
* @since 10
*/
function off(type: 'checkNotification', callback?: (checkInfo: NotificationCheckInfo) => NotificationCheckResult): void;
function off(
type: 'checkNotification',
callback?: (checkInfo: NotificationCheckInfo) => NotificationCheckResult
): void;
/**
* Describes the parameters of check notifications.
@ -1693,6 +1697,7 @@ declare namespace notificationManager {
* The application bundle name for publishing notification.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
@ -1703,6 +1708,7 @@ declare namespace notificationManager {
* The notification id.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
* @type { number }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
@ -1713,6 +1719,7 @@ declare namespace notificationManager {
* The notification content type.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
* @type { ContentType }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
@ -1734,6 +1741,7 @@ declare namespace notificationManager {
* The result code. 0-display, 1-no display
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
* @type { number }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
@ -1744,6 +1752,7 @@ declare namespace notificationManager {
* The result message.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
@ -1960,6 +1969,7 @@ declare namespace notificationManager {
/**
* the type of the Do Not Disturb.
*
* @type { DoNotDisturbType }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -1969,6 +1979,7 @@ declare namespace notificationManager {
/**
* The start time of the Do Not Disturb.
*
* @type { Date }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
@ -1978,6 +1989,7 @@ declare namespace notificationManager {
/**
* The end time of the Do Not Disturb.
*
* @type { Date }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9

View File

@ -36,7 +36,24 @@ declare namespace notificationSubscribe {
* @since 9
*/
export interface NotificationKey {
/**
* Notify ID.
*
* @type { number }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
id: number;
/**
* Notification label.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 9
*/
label?: string;
}
@ -116,7 +133,7 @@ declare namespace notificationSubscribe {
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { NotificationSubscriber } subscriber - The notification subscriber.
* @param { NotificationSubscribeInfo } info - The notification subscribe info.
* @param { NotificationSubscribeInfo } [info] - The notification subscribe info.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
@ -334,7 +351,7 @@ declare namespace notificationSubscribe {
* RemoveAll all notifications.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { BundleOption } bundle - The bundle option.
* @param { BundleOption } [bundle] - The bundle option.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.

View File

@ -26,7 +26,7 @@ import { TriggerInfo } from './wantAgent/triggerInfo';
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent
* @useinstead ohos.app.ability.wantAgent/wantAgent
*/
declare namespace wantAgent {
/**
@ -37,7 +37,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#getBundleName
* @useinstead ohos.app.ability.wantAgent/wantAgent#getBundleName
*/
function getBundleName(agent: WantAgent, callback: AsyncCallback<string>): void;
@ -49,7 +49,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#getBundleName
* @useinstead ohos.app.ability.wantAgent/wantAgent#getBundleName
*/
function getBundleName(agent: WantAgent): Promise<string>;
@ -61,7 +61,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#getUid
* @useinstead ohos.app.ability.wantAgent/wantAgent#getUid
*/
function getUid(agent: WantAgent, callback: AsyncCallback<number>): void;
@ -73,7 +73,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#getUid
* @useinstead ohos.app.ability.wantAgent/wantAgent#getUid
*/
function getUid(agent: WantAgent): Promise<number>;
@ -86,7 +86,7 @@ declare namespace wantAgent {
* @systemapi
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#getWant
* @useinstead ohos.app.ability.wantAgent/wantAgent#getWant
*/
function getWant(agent: WantAgent, callback: AsyncCallback<Want>): void;
@ -99,7 +99,7 @@ declare namespace wantAgent {
* @systemapi
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#getWant
* @useinstead ohos.app.ability.wantAgent/wantAgent#getWant
*/
function getWant(agent: WantAgent): Promise<Want>;
@ -111,7 +111,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#cancel
* @useinstead ohos.app.ability.wantAgent/wantAgent#cancel
*/
function cancel(agent: WantAgent, callback: AsyncCallback<void>): void;
@ -123,7 +123,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#cancel
* @useinstead ohos.app.ability.wantAgent/wantAgent#cancel
*/
function cancel(agent: WantAgent): Promise<void>;
@ -132,11 +132,12 @@ declare namespace wantAgent {
*
* @param { WantAgent } agent to trigger.
* @param { TriggerInfo } triggerInfo parameters.
* @param { Callback<CompleteData> } callback Indicates the callback method to be called after the {@link WantAgent} is triggered.
* @param { Callback<CompleteData> } [callback] Indicates the callback method to be called after
* the {@link WantAgent} is triggered.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#trigger
* @useinstead ohos.app.ability.wantAgent/wantAgent#trigger
*/
function trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: Callback<CompleteData>): void;
@ -149,7 +150,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#equal
* @useinstead ohos.app.ability.wantAgent/wantAgent#equal
*/
function equal(agent: WantAgent, otherAgent: WantAgent, callback: AsyncCallback<boolean>): void;
@ -162,7 +163,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#equal
* @useinstead ohos.app.ability.wantAgent/wantAgent#equal
*/
function equal(agent: WantAgent, otherAgent: WantAgent): Promise<boolean>;
@ -174,7 +175,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#getWantAgent
* @useinstead ohos.app.ability.wantAgent/wantAgent#getWantAgent
*/
function getWantAgent(info: WantAgentInfo, callback: AsyncCallback<WantAgent>): void;
@ -186,7 +187,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#getWantAgent
* @useinstead ohos.app.ability.wantAgent/wantAgent#getWantAgent
*/
function getWantAgent(info: WantAgentInfo): Promise<WantAgent>;
@ -197,7 +198,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#WantAgentFlags
* @useinstead ohos.app.ability.wantAgent/wantAgent#WantAgentFlags
*/
export enum WantAgentFlags {
/**
@ -207,7 +208,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#ONE_TIME_FLAG
* @useinstead ohos.app.ability.wantAgent/wantAgent.WantAgentFlags#ONE_TIME_FLAG
*/
ONE_TIME_FLAG = 0,
@ -218,7 +219,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#NO_BUILD_FLAG
* @useinstead ohos.app.ability.wantAgent/wantAgent.WantAgentFlags#NO_BUILD_FLAG
*/
NO_BUILD_FLAG,
@ -229,7 +230,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#CANCEL_PRESENT_FLAG
* @useinstead ohos.app.ability.wantAgent/wantAgent.WantAgentFlags#CANCEL_PRESENT_FLAG
*/
CANCEL_PRESENT_FLAG,
@ -240,7 +241,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#UPDATE_PRESENT_FLAG
* @useinstead ohos.app.ability.wantAgent/wantAgent.WantAgentFlags#UPDATE_PRESENT_FLAG
*/
UPDATE_PRESENT_FLAG,
@ -250,7 +251,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#CONSTANT_FLAG
* @useinstead ohos.app.ability.wantAgent/wantAgent.WantAgentFlags#CONSTANT_FLAG
*/
CONSTANT_FLAG,
@ -260,7 +261,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#REPLACE_ELEMENT
* @useinstead ohos.app.ability.wantAgent/wantAgent.WantAgentFlags#REPLACE_ELEMENT
*/
REPLACE_ELEMENT,
@ -270,7 +271,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#REPLACE_ACTION
* @useinstead ohos.app.ability.wantAgent/wantAgent.WantAgentFlags#REPLACE_ACTION
*/
REPLACE_ACTION,
@ -280,7 +281,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#REPLACE_URI
* @useinstead ohos.app.ability.wantAgent/wantAgent.WantAgentFlags#REPLACE_URI
*/
REPLACE_URI,
@ -290,7 +291,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#REPLACE_ENTITIES
* @useinstead ohos.app.ability.wantAgent/wantAgent.WantAgentFlags#REPLACE_ENTITIES
*/
REPLACE_ENTITIES,
@ -300,7 +301,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#REPLACE_BUNDLE
* @useinstead ohos.app.ability.wantAgent/wantAgent.WantAgentFlags#REPLACE_BUNDLE
*/
REPLACE_BUNDLE
}
@ -312,7 +313,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#OperationType
* @useinstead ohos.app.ability.wantAgent/wantAgent#OperationType
*/
export enum OperationType {
/**
@ -321,7 +322,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#UNKNOWN_TYPE
* @useinstead ohos.app.ability.wantAgent/wantAgent.OperationType#UNKNOWN_TYPE
*/
UNKNOWN_TYPE = 0,
@ -331,7 +332,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#START_ABILITY
* @useinstead ohos.app.ability.wantAgent/wantAgent.OperationType#START_ABILITY
*/
START_ABILITY,
@ -341,7 +342,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#START_ABILITIES
* @useinstead ohos.app.ability.wantAgent/wantAgent.OperationType#START_ABILITIES
*/
START_ABILITIES,
@ -351,7 +352,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#START_SERVICE
* @useinstead ohos.app.ability.wantAgent/wantAgent.OperationType#START_SERVICE
*/
START_SERVICE,
@ -361,7 +362,7 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#SEND_COMMON_EVENT
* @useinstead ohos.app.ability.wantAgent/wantAgent.OperationType#SEND_COMMON_EVENT
*/
SEND_COMMON_EVENT
}
@ -373,56 +374,61 @@ declare namespace wantAgent {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#CompleteData
* @useinstead ohos.app.ability.wantAgent/wantAgent#CompleteData
*/
export interface CompleteData {
/**
* Triggered WantAgent.
*
* @type { WantAgent }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#info
* @useinstead ohos.app.ability.wantAgent/wantAgent.CompleteData#info
*/
info: WantAgent;
/**
* Existing Want that is triggered.
*
* @type { Want }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#want
* @useinstead ohos.app.ability.wantAgent/wantAgent.CompleteData#want
*/
want: Want;
/**
* Request code used to trigger the WantAgent.
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#finalCode
* @useinstead ohos.app.ability.wantAgent/wantAgent.CompleteData#finalCode
*/
finalCode: number;
/**
* Final data collected by the common event.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#finalData
* @useinstead ohos.app.ability.wantAgent/wantAgent.CompleteData#finalData
*/
finalData: string;
/**
* Extra data collected by the common event.
*
* @type { ?object }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.wantAgent#extraInfo
* @useinstead ohos.app.ability.wantAgent/wantAgent.CompleteData#extraInfo
*/
extraInfo?: { [key: string]: any };
}

View File

@ -22,6 +22,7 @@ export interface ActionResult {
/**
* Bundle name of the application to be redirected to after the notification is clicked.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 3
*/
@ -30,6 +31,7 @@ export interface ActionResult {
/**
* Ability name of the application to be redirected to after the notification is clicked.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 3
*/
@ -42,6 +44,7 @@ export interface ActionResult {
* pages/detail/detail
* 2. Particular path. If the value is a slash (/), the home page is displayed.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 3
*/
@ -57,6 +60,7 @@ export interface ShowNotificationOptions {
/**
* Notification title.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @since 3
*/
@ -65,6 +69,7 @@ export interface ShowNotificationOptions {
/**
* Notification content.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @since 3
*/
@ -73,6 +78,7 @@ export interface ShowNotificationOptions {
/**
* Action triggered after the notification is clicked.
*
* @type { ?ActionResult }
* @syscap SystemCapability.Notification.Notification
* @since 3
*/
@ -87,7 +93,7 @@ export default class Notification {
/**
* Displays the notification.
*
* @param { ShowNotificationOptions } options Options.
* @param { ShowNotificationOptions } [options] Options.
* @syscap SystemCapability.Notification.Notification
* @since 3
*/

View File

@ -78,7 +78,7 @@ export interface DataAbilityHelper {
*
* @param { 'dataChange' } type dataChange.
* @param { string } uri Indicates the path of the data to operate.
* @param { AsyncCallback<void> } callback Indicates the registered callback.
* @param { AsyncCallback<void> } [callback] Indicates the registered callback.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 7
@ -272,7 +272,7 @@ export interface DataAbilityHelper {
* Deletes one or more data records from the database.
*
* @param { string } uri Indicates the path of the data to delete.
* @param { dataAbility.DataAbilityPredicates } predicates Indicates filter criteria. You should define the
* @param { dataAbility.DataAbilityPredicates } [predicates] Indicates filter criteria. You should define the
* processing logic when this parameter is null.
* @returns { Promise<number> } Returns the number of data records deleted.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
@ -318,7 +318,7 @@ export interface DataAbilityHelper {
*
* @param { string } uri Indicates the path of data to update.
* @param { rdb.ValuesBucket } valuesBucket Indicates the data to update.
* @param { dataAbility.DataAbilityPredicates } predicates Indicates filter criteria. You should define the
* @param { dataAbility.DataAbilityPredicates } [predicates] Indicates filter criteria. You should define the
* processing logic when this parameter is null.
* @returns { Promise<number> } Returns the number of data records updated.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
@ -403,8 +403,8 @@ export interface DataAbilityHelper {
* Queries data in the database.
*
* @param { string } uri Indicates the path of data to query.
* @param { Array<string> } columns Indicates columns to query. If this parameter is null, all columns are queried.
* @param { dataAbility.DataAbilityPredicates } predicates Indicates filter criteria. You should define the
* @param { Array<string> } [columns] Indicates columns to query. If this parameter is null, all columns are queried.
* @param { dataAbility.DataAbilityPredicates } [predicates] Indicates filter criteria. You should define the
* processing logic when this parameter is null.
* @returns { Promise<ResultSet> } Returns the query result {@link ResultSet}.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel

View File

@ -36,7 +36,7 @@ export interface StartAbilityParameter {
/**
* Indicates the special start setting used in starting ability.
*
* @type { ?[key: string]: any }
* @type { ?object }
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @FAModelOnly
* @since 6

22
api/ability/want.d.ts vendored
View File

@ -20,7 +20,7 @@
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.Want
* @useinstead ohos.app.ability.Want/Want
*/
export declare interface Want {
/**
@ -30,7 +30,7 @@ export declare interface Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.Want#deviceId
* @useinstead ohos.app.ability.Want/Want#deviceId
*/
deviceId?: string;
@ -41,7 +41,7 @@ export declare interface Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.Want#bundleName
* @useinstead ohos.app.ability.Want/Want#bundleName
*/
bundleName?: string;
@ -52,7 +52,7 @@ export declare interface Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.Want#abilityName
* @useinstead ohos.app.ability.Want/Want#abilityName
*/
abilityName?: string;
@ -63,7 +63,7 @@ export declare interface Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.Want#uri
* @useinstead ohos.app.ability.Want/Want#uri
*/
uri?: string;
@ -74,7 +74,7 @@ export declare interface Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.Want#type
* @useinstead ohos.app.ability.Want/Want#type
*/
type?: string;
@ -85,7 +85,7 @@ export declare interface Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.Want#flags
* @useinstead ohos.app.ability.Want/Want#flags
*/
flags?: number;
@ -96,18 +96,18 @@ export declare interface Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.Want#action
* @useinstead ohos.app.ability.Want/Want#action
*/
action?: string;
/**
* The description of the WantParams object in an Want
*
* @type { ?[key: string]: any }
* @type { ?object }
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.Want#parameters
* @useinstead ohos.app.ability.Want/Want#parameters
*/
parameters?: { [key: string]: any };
@ -118,7 +118,7 @@ export declare interface Want {
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.Want#entities
* @useinstead ohos.app.ability.Want/Want#entities
*/
entities?: Array<string>;
}

View File

@ -24,7 +24,9 @@ export interface AppVersionInfo {
/**
* Application name.
*
* @type { string }
* @default appName
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/
@ -33,7 +35,9 @@ export interface AppVersionInfo {
/**
* Application version number.
*
* @type { number }
* @default versionCode
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/
@ -42,7 +46,9 @@ export interface AppVersionInfo {
/**
* Application version name.
*
* @type { string }
* @default versionName
* @readonly
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/

11
api/app/context.d.ts vendored
View File

@ -69,7 +69,7 @@ export interface Context extends BaseContext {
* it will check your own permission.
*
* @param { string } permission The name of the specified permission.
* @param { PermissionOptions } options Permission Options.
* @param { PermissionOptions } [options] Permission Options.
* @returns { Promise<number> } asynchronous callback with {@code 0} if the PID
* and UID have the permission; callback with {@code -1} otherwise.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
@ -246,7 +246,7 @@ export interface Context extends BaseContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.window#setShowOnLockScreen
* @useinstead ohos.window/window.WindowStage#setShowOnLockScreen
*/
setShowOnLockScreen(show: boolean, callback: AsyncCallback<void>): void;
@ -261,7 +261,7 @@ export interface Context extends BaseContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.window#setShowOnLockScreen
* @useinstead ohos.window/window.WindowStage#setShowOnLockScreen
*/
setShowOnLockScreen(show: boolean): Promise<void>;
@ -569,6 +569,7 @@ export interface Context extends BaseContext {
*/
interface PermissionRequestResult {
/**
* @type { number }
* @default The request code passed in by the user
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @FAModelOnly
@ -577,6 +578,7 @@ interface PermissionRequestResult {
requestCode: number;
/**
* @type { Array<string> }
* @default The permissions passed in by the user
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @FAModelOnly
@ -585,6 +587,7 @@ interface PermissionRequestResult {
permissions: Array<string>;
/**
* @type { Array<number> }
* @default The results for the corresponding request permissions
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @FAModelOnly
@ -601,6 +604,7 @@ interface PermissionRequestResult {
*/
interface PermissionOptions {
/**
* @type { ?number }
* @default The process id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @FAModelOnly
@ -609,6 +613,7 @@ interface PermissionOptions {
pid?: number;
/**
* @type { ?number }
* @default The user id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @FAModelOnly

View File

@ -155,7 +155,7 @@ export interface AbilityDelegator {
* Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
*
* @param { AbilityMonitor } monitor - AbilityMonitor object.
* @param { number } timeout - Maximum wait time, in milliseconds.
* @param { number } [timeout] - Maximum wait time, in milliseconds.
* @returns { Promise<UIAbility> } Returns the Ability object.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000100 - WaitAbilityMonitor failed.
@ -193,7 +193,7 @@ export interface AbilityDelegator {
* Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
*
* @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
* @param { number } timeout - Maximum wait time, in milliseconds.
* @param { number } [timeout] - Maximum wait time, in milliseconds.
* @returns { Promise<AbilityStage> } Returns the AbilityStage object.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000100 - WaitAbilityStageMonitor failed.
@ -265,6 +265,30 @@ export interface AbilityDelegator {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
/**
* Start a new ability.
*
* @param { Want } want - Indicates the ability to start
* @param { AsyncCallback<void> } callback - The callback of startAbility.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @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
* @since 10
*/
startAbility(want: Want, callback: AsyncCallback<void>): void;
/**
@ -289,6 +313,30 @@ export interface AbilityDelegator {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
/**
* Start a new ability.
*
* @param { Want } want - Indicates the ability to start
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @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
* @since 10
*/
startAbility(want: Want): Promise<void>;
/**
@ -397,7 +445,7 @@ export interface AbilityDelegator {
* Execute the given command in the aa tools side.
*
* @param { string } cmd Shell command
* @param { number } timeoutSecs Timeout, in seconds
* @param { number } [timeoutSecs] Timeout, in seconds
* @returns { Promise<ShellCmdResult> } the promise returned by the function.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8

View File

@ -39,6 +39,7 @@ export default class AbilityStageContext extends Context {
/**
* Indicates configuration information about an module.
*
* @type { HapModuleInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
@ -47,6 +48,7 @@ export default class AbilityStageContext extends Context {
/**
* Indicates configuration information about an module.
*
* @type { HapModuleInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
@ -57,6 +59,7 @@ export default class AbilityStageContext extends Context {
/**
* Indicates configuration information.
*
* @type { Configuration }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
@ -65,6 +68,7 @@ export default class AbilityStageContext extends Context {
/**
* Indicates configuration information.
*
* @type { Configuration }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform

View File

@ -40,7 +40,7 @@ export default class ApplicationContext extends Context {
/**
* Register ability lifecycle callback.
*
* @param { "abilityLifecycle" } type - abilityLifecycle.
* @param { 'abilityLifecycle' } type - abilityLifecycle.
* @param { AbilityLifecycleCallback } callback - The ability lifecycle callback.
* @returns { number } Returns the number code of the callback.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
@ -50,7 +50,8 @@ export default class ApplicationContext extends Context {
*/
/**
* Register ability lifecycle callback.
* @param { "abilityLifecycle" } type - abilityLifecycle.
*
* @param { 'abilityLifecycle' } type - abilityLifecycle.
* @param { AbilityLifecycleCallback } callback - The ability lifecycle callback.
* @returns { number } Returns the number code of the callback.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
@ -59,12 +60,12 @@ export default class ApplicationContext extends Context {
* @crossplatform
* @since 10
*/
on(type: "abilityLifecycle", callback: AbilityLifecycleCallback): number;
on(type: 'abilityLifecycle', callback: AbilityLifecycleCallback): number;
/**
* Unregister ability lifecycle callback.
*
* @param { "abilityLifecycle" } type - abilityLifecycle.
* @param { 'abilityLifecycle' } type - abilityLifecycle.
* @param { number } callbackId - Indicates the number code of the callback.
* @param { AsyncCallback<void> } callback - The callback of off.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
@ -74,7 +75,8 @@ export default class ApplicationContext extends Context {
*/
/**
* Unregister ability lifecycle callback.
* @param { "abilityLifecycle" } type - abilityLifecycle.
*
* @param { 'abilityLifecycle' } type - abilityLifecycle.
* @param { number } callbackId - Indicates the number code of the callback.
* @param { AsyncCallback<void> } callback - The callback of off.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
@ -83,7 +85,7 @@ export default class ApplicationContext extends Context {
* @crossplatform
* @since 10
*/
off(type: "abilityLifecycle", callbackId: number, callback: AsyncCallback<void>): void;
off(type: 'abilityLifecycle', callbackId: number, callback: AsyncCallback<void>): void;
/**
* Unregister ability lifecycle callback.
@ -150,6 +152,7 @@ export default class ApplicationContext extends Context {
*/
/**
* Get information about running processes
*
* @returns { Promise<Array<ProcessInformation>> } Returns the array of {@link ProcessInformation}.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000011 - The context does not exist.
@ -174,6 +177,7 @@ export default class ApplicationContext extends Context {
*/
/**
* Get information about running processes
*
* @param { AsyncCallback<Array<ProcessInformation>> } callback - The callback is used to return the array of {@link ProcessInformation}.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000011 - The context does not exist.

View File

@ -16,7 +16,7 @@
/**
* The base context of 'app.Context' for FA Mode or
* 'application.Context' for Stage Mode.
* @permission N/A
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
* @since 8
@ -24,7 +24,7 @@
/**
* The base context of 'app.Context' for FA Mode or
* 'application.Context' for Stage Mode.
* @permission N/A
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
* @since 10
@ -33,6 +33,7 @@ export default abstract class BaseContext {
/**
* Indicates the context is FA Mode or Stage Mode.
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
* @since 10
@ -40,6 +41,7 @@ export default abstract class BaseContext {
/**
* Indicates the context is FA Mode or Stage Mode.
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
* @since 8

View File

@ -50,6 +50,7 @@ export default class Context extends BaseContext {
*/
/**
* Indicates the capability of accessing application resources.
*
* @type { resmgr.ResourceManager }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -68,6 +69,7 @@ export default class Context extends BaseContext {
*/
/**
* Indicates configuration information about an application.
*
* @type { ApplicationInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -86,6 +88,7 @@ export default class Context extends BaseContext {
*/
/**
* Indicates app cache dir.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -104,6 +107,7 @@ export default class Context extends BaseContext {
*/
/**
* Indicates app temp dir.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -122,6 +126,7 @@ export default class Context extends BaseContext {
*/
/**
* Indicates app files dir.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -140,6 +145,7 @@ export default class Context extends BaseContext {
*/
/**
* Indicates app database dir.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -158,6 +164,7 @@ export default class Context extends BaseContext {
*/
/**
* Indicates app preferences dir.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -176,6 +183,7 @@ export default class Context extends BaseContext {
*/
/**
* Indicates app bundle code dir.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -242,6 +250,7 @@ export default class Context extends BaseContext {
*/
/**
* Create a module context
*
* @param { string } moduleName - Indicates the module name.
* @returns { Context } Returns the application context.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
@ -277,6 +286,7 @@ export default class Context extends BaseContext {
*/
/**
* Get application context
*
* @returns { ApplicationContext } Returns the application context.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.AbilityRuntime.Core

View File

@ -52,7 +52,7 @@ export interface ContinueDeviceInfo {
/**
* Indicates the extended param.
*
* @type { [key: string]: any }
* @type { object }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 9

View File

@ -39,7 +39,7 @@ export default class EventHub {
* Unsubscribe from an event.
*
* @param { string } event - Indicates the event.
* @param { Function } callback - Indicates the callback.
* @param { Function } [callback] - Indicates the callback.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly

View File

@ -30,6 +30,7 @@ export default class ExtensionContext extends Context {
/**
* Indicates configuration information about an module.
*
* @type { HapModuleInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 9
@ -39,6 +40,7 @@ export default class ExtensionContext extends Context {
/**
* Indicates configuration information.
*
* @type { Configuration }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @since 9
@ -48,6 +50,7 @@ export default class ExtensionContext extends Context {
/**
* Extension information.
*
* @type { ExtensionAbilityInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/

View File

@ -26,6 +26,7 @@ import bundle from '../@ohos.bundle.bundleManager';
*/
export interface ExtensionRunningInfo {
/**
* @type { ElementName }
* @default Indicates the extension of the extension info
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
@ -34,6 +35,7 @@ export interface ExtensionRunningInfo {
extension: ElementName;
/**
* @type { number }
* @default process id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
@ -42,6 +44,7 @@ export interface ExtensionRunningInfo {
pid: number;
/**
* @type { number }
* @default user id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
@ -50,6 +53,7 @@ export interface ExtensionRunningInfo {
uid: number;
/**
* @type { string }
* @default the name of the process
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
@ -58,6 +62,7 @@ export interface ExtensionRunningInfo {
processName: string;
/**
* @type { number }
* @default ability start time
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
@ -66,6 +71,7 @@ export interface ExtensionRunningInfo {
startTime: number;
/**
* @type { Array<String> }
* @default All package names under the current process
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
@ -74,6 +80,7 @@ export interface ExtensionRunningInfo {
clientPackage: Array<String>;
/**
* @type { bundle.ExtensionAbilityType }
* @default Enumerates types of the extension info
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi

View File

@ -27,6 +27,7 @@ export interface MissionDeviceInfo {
* Indicates the deviceId to start sync.
*
* @permission ohos.permission.MANAGE_MISSIONS
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 9

View File

@ -27,6 +27,7 @@ export interface MissionInfo {
/**
* Indicates mission id.
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 8
@ -36,6 +37,7 @@ export interface MissionInfo {
/**
* Indicates running state.
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 8
@ -45,6 +47,7 @@ export interface MissionInfo {
/**
* Indicates locked state.
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 8
@ -54,6 +57,7 @@ export interface MissionInfo {
/**
* Indicates the recent created or updated time of the mission.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 8
@ -63,6 +67,7 @@ export interface MissionInfo {
/**
* Indicates want of the mission.
*
* @type { Want }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 8
@ -72,6 +77,7 @@ export interface MissionInfo {
/**
* Indicates label of the mission.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 8
@ -81,6 +87,7 @@ export interface MissionInfo {
/**
* Indicates icon path of the mission.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 8
@ -90,6 +97,7 @@ export interface MissionInfo {
/**
* Indicates whether the mission is continuable.
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 8

View File

@ -27,6 +27,7 @@ export interface MissionParameter {
* Indicates the deviceId to start sync.
*
* @permission ohos.permission.MANAGE_MISSIONS
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 9
@ -37,6 +38,7 @@ export interface MissionParameter {
* If needed to fix the versions conflict.
*
* @permission ohos.permission.MANAGE_MISSIONS
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 9
@ -47,6 +49,7 @@ export interface MissionParameter {
* Tag used to be specified.
*
* @permission ohos.permission.MANAGE_MISSIONS
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 9

View File

@ -28,6 +28,7 @@ export interface MissionSnapshot {
/**
* Indicates the ability elementName of the mission.
*
* @type { ElementName }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 8
@ -37,6 +38,7 @@ export interface MissionSnapshot {
/**
* Indicates mission snapshot.
*
* @type { image.PixelMap }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
* @since 8

View File

@ -24,6 +24,7 @@ export default class ProcessData {
/**
* The bundle name.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
@ -33,6 +34,7 @@ export default class ProcessData {
/**
* The pid.
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
@ -42,6 +44,7 @@ export default class ProcessData {
/**
* The uid.
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
@ -51,6 +54,7 @@ export default class ProcessData {
/**
* The process state.
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
@ -60,6 +64,7 @@ export default class ProcessData {
/**
* Whether the process is continuous task.
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
@ -69,6 +74,7 @@ export default class ProcessData {
/**
* Whether the process is keep alive.
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9

View File

@ -31,12 +31,14 @@
*/
export interface ProcessInformation {
/**
* @type { number }
* @default process id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
* @since 9
*/
/**
* @type { number }
* @default process id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
@ -45,6 +47,7 @@ export interface ProcessInformation {
pid: number;
/**
* @type { number }
* @default user id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
@ -52,26 +55,30 @@ export interface ProcessInformation {
uid: number;
/**
* @type { string }
* @default the name of the process
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
* @since 9
*/
/**
* @type { string }
* @default the name of the process
* @since 10
* @crossplatform
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
* @since 10
*/
processName: string;
/**
* @type { Array<string> }
* @default an array of the bundleNames running in the process
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
* @since 9
*/
/**
* @type { Array<string> }
* @default an array of the bundleNames running in the process
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform

View File

@ -20,42 +20,46 @@
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @since 8
* @deprecated since 9
* @useinstead ProcessInformation
* @useinstead ProcessInformation/ProcessInformation
*/
export interface ProcessRunningInfo {
/**
* @type { number }
* @default process id
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @since 8
* @deprecated since 9
* @useinstead ProcessInformation#pid
* @useinstead ProcessInformation/ProcessInformation#pid
*/
pid: number;
/**
* @type { number }
* @default user id
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @since 8
* @deprecated since 9
* @useinstead ProcessInformation#uid
* @useinstead ProcessInformation/ProcessInformation#uid
*/
uid: number;
/**
* @type { string }
* @default the name of the process
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @since 8
* @deprecated since 9
* @useinstead ProcessInformation#processName
* @useinstead ProcessInformation/ProcessInformation#processName
*/
processName: string;
/**
* @type { Array<string> }
* @default an array of the bundleNames running in the process
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @since 8
* @deprecated since 9
* @useinstead ProcessInformation#bundleNames
* @useinstead ProcessInformation/ProcessInformation#bundleNames
*/
bundleNames: Array<string>;
}

View File

@ -62,6 +62,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -75,6 +76,8 @@ export default class ServiceExtensionContext extends ExtensionContext {
* @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.
@ -118,6 +121,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -130,6 +134,8 @@ export default class ServiceExtensionContext extends ExtensionContext {
* @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.
@ -173,8 +179,9 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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 { 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 - If the input parameter is not valid parameter.
@ -187,6 +194,8 @@ export default class ServiceExtensionContext extends ExtensionContext {
* @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.
@ -222,6 +231,8 @@ export default class ServiceExtensionContext extends ExtensionContext {
* @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.
@ -269,6 +280,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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 ability to start.
* @param { number } accountId - Indicates the accountId to start.
@ -284,6 +296,8 @@ export default class ServiceExtensionContext extends ExtensionContext {
* @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.
@ -306,7 +320,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the ability to start.
* @param { number } accountId - Indicates the accountId to start.
* @param { StartOptions } options - Indicates the start options.
* @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.
@ -320,6 +334,8 @@ export default class ServiceExtensionContext extends ExtensionContext {
* @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.
@ -359,6 +375,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -371,6 +388,8 @@ export default class ServiceExtensionContext extends ExtensionContext {
* @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
@ -408,6 +427,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -420,6 +440,8 @@ export default class ServiceExtensionContext extends ExtensionContext {
* @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
@ -460,6 +482,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -474,6 +497,8 @@ export default class ServiceExtensionContext extends ExtensionContext {
* @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
@ -514,6 +539,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -528,6 +554,8 @@ export default class ServiceExtensionContext extends ExtensionContext {
* @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
@ -564,6 +592,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -611,6 +640,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -661,6 +691,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -713,6 +744,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -753,6 +785,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
*/
/**
* Destroys this service extension.
*
* @param { AsyncCallback<void> } callback - The callback of terminateSelf.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
@ -782,6 +815,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
*/
/**
* Destroys this service extension.
*
* @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.
@ -824,6 +858,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* <p>This method can be called by an ability or service extension, but the destination of the connection must be a
* service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target
* service extension when the Service extension is connected.</p>
*
* @param { Want } want - Indicates the service extension to connect.
* @param { ConnectOptions } options - Indicates the callback of connection.
* @returns { number } Returns the connection id.
@ -880,6 +915,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* <p>This method can be called by an ability or service extension, but the destination of the connection must be a
* service extension. You must implement the {@link ConnectOptions} interface to obtain the proxy of the target
* service extension when the Service extension is connected.</p>
*
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { Want } want - Indicates the service extension to connect.
* @param { number } accountId - Indicates the account to connect.
@ -965,6 +1001,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -1048,6 +1085,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -1105,6 +1143,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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.
@ -1133,7 +1172,7 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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 { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
@ -1161,8 +1200,9 @@ export default class ServiceExtensionContext extends ExtensionContext {
* 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 { 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 - If the input parameter is not valid parameter.

View File

@ -39,6 +39,8 @@ import dialogRequest from '../@ohos.app.ability.dialogRequest';
*/
/**
* The context of an ability. It allows access to ability-specific resources.
*
* @extends Context
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
@ -56,7 +58,6 @@ export default class UIAbilityContext extends Context {
/**
* Indicates configuration information about an ability.
*
* @extends Context
* @type { AbilityInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -75,6 +76,7 @@ export default class UIAbilityContext extends Context {
*/
/**
* Indicates configuration information about the module.
*
* @type { HapModuleInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
@ -122,6 +124,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -135,6 +138,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -176,6 +181,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -188,6 +194,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -202,7 +210,7 @@ export default class UIAbilityContext extends Context {
* Starts a new ability.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
@ -231,7 +239,7 @@ export default class UIAbilityContext extends Context {
* 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 { 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 - If the input parameter is not valid parameter.
@ -244,6 +252,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -283,6 +293,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -294,6 +305,8 @@ export default class UIAbilityContext extends Context {
* @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
@ -324,6 +337,8 @@ export default class UIAbilityContext extends Context {
* @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
@ -340,6 +355,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -356,6 +372,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -369,7 +387,7 @@ export default class UIAbilityContext extends Context {
/**
* 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.
@ -403,6 +421,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -418,6 +437,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -440,7 +461,7 @@ export default class UIAbilityContext extends Context {
* @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 { 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.
@ -454,6 +475,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -495,6 +518,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -508,6 +532,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -549,6 +575,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -561,6 +588,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -575,7 +604,7 @@ export default class UIAbilityContext extends Context {
* 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 { StartOptions } [options] - Indicates the start options.
* @returns { Promise<AbilityResult> } Returns the result of startAbility.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
@ -602,8 +631,9 @@ export default class UIAbilityContext extends Context {
* 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 { 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 - If the input parameter is not valid parameter.
@ -616,6 +646,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -659,6 +691,36 @@ export default class UIAbilityContext extends Context {
* @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 - If the input parameter is not valid parameter.
* @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
*/
startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback<AbilityResult>): void;
/**
@ -713,6 +775,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -722,7 +786,12 @@ export default class UIAbilityContext extends Context {
* @StageModelOnly
* @since 10
*/
startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback<void>): void;
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.
@ -731,11 +800,11 @@ export default class UIAbilityContext extends Context {
* 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 { 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.
@ -758,6 +827,37 @@ export default class UIAbilityContext extends Context {
* @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 - If the input parameter is not valid parameter.
* @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
*/
startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartOptions): Promise<AbilityResult>;
/**
@ -801,6 +901,8 @@ export default class UIAbilityContext extends Context {
* @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
@ -812,6 +914,7 @@ export default class UIAbilityContext extends Context {
/**
* 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.
@ -837,6 +940,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -849,6 +953,8 @@ export default class UIAbilityContext extends Context {
* @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
@ -860,6 +966,7 @@ export default class UIAbilityContext extends Context {
/**
* 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.
@ -888,6 +995,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -902,6 +1010,8 @@ export default class UIAbilityContext extends Context {
* @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
@ -942,6 +1052,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -956,6 +1067,8 @@ export default class UIAbilityContext extends Context {
* @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
@ -992,6 +1105,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -1003,6 +1117,8 @@ export default class UIAbilityContext extends Context {
* @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
@ -1039,6 +1155,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -1089,6 +1206,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -1141,6 +1259,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -1180,11 +1299,9 @@ export default class UIAbilityContext extends Context {
*/
/**
* Destroys this Page ability.
*
* @param { AsyncCallback<void> } callback - The callback of terminateSelf.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @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.
@ -1211,10 +1328,8 @@ export default class UIAbilityContext extends Context {
*/
/**
* 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.
@ -1245,6 +1360,7 @@ export default class UIAbilityContext extends Context {
/**
* Sets the result code and data to be returned by this Page ability to the caller
* and destroys this Page ability.
*
* @param { AbilityResult } parameter - Indicates the result to return.
* @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
@ -1277,6 +1393,7 @@ export default class UIAbilityContext extends Context {
/**
* Sets the result code and data to be returned by this Page ability to the caller
* and destroys this Page ability.
*
* @param { AbilityResult } parameter - Indicates the result to return.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
@ -1313,6 +1430,7 @@ export default class UIAbilityContext extends Context {
* 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
@ -1362,6 +1480,7 @@ export default class UIAbilityContext extends Context {
* 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
@ -1458,6 +1577,7 @@ export default class UIAbilityContext extends Context {
*/
/**
* 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.
@ -1486,6 +1606,7 @@ export default class UIAbilityContext extends Context {
*/
/**
* 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.
@ -1555,6 +1676,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -1568,6 +1690,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -1612,6 +1736,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -1624,6 +1749,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -1640,7 +1767,7 @@ export default class UIAbilityContext extends Context {
* 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 { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
@ -1668,8 +1795,9 @@ export default class UIAbilityContext extends Context {
* 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 { 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 - If the input parameter is not valid parameter.
@ -1682,6 +1810,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -1723,6 +1853,7 @@ export default class UIAbilityContext extends Context {
* 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.
@ -1736,6 +1867,8 @@ export default class UIAbilityContext extends Context {
* @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.
@ -1775,7 +1908,9 @@ export default class UIAbilityContext extends Context {
* 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.
* 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.
@ -1789,6 +1924,8 @@ export default class UIAbilityContext extends Context {
* @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.

View File

@ -47,7 +47,7 @@ export default class WindowExtensionContext extends ExtensionContext {
* Window extension uses this method to start a specific ability.
*
* @param { Want } want - Indicates the ability to start.
* @param { StartOptions } options - Indicates the start options.
* @param { StartOptions } [options] - Indicates the start options.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @syscap SystemCapability.WindowManager.WindowManager.Core

View File

@ -33,7 +33,7 @@ export interface AbilityDelegatorArgs {
/**
* the parameters used for unit testing.
*
* @type { [key: string]: string }
* @type { object }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
*/

View File

@ -24,6 +24,7 @@ export interface CommonEventData {
/**
* event type
*
* @type { string }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
@ -32,6 +33,7 @@ export interface CommonEventData {
/**
* bundle name
*
* @type { ?string }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
@ -40,6 +42,7 @@ export interface CommonEventData {
/**
* The custom result code of the common event.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
@ -49,6 +52,7 @@ export interface CommonEventData {
/**
* The custom result data of the common event.
*
* @type { ?string }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
@ -57,6 +61,7 @@ export interface CommonEventData {
/**
* The description of the parameters in a common event.
*
* @type { ?object }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/

View File

@ -24,6 +24,7 @@ export interface CommonEventPublishData {
/**
* bundle name
*
* @type { ?string }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
@ -32,6 +33,7 @@ export interface CommonEventPublishData {
/**
* The custom result code of the common event.
*
* @type { ?number }
* @default 0
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
@ -41,6 +43,7 @@ export interface CommonEventPublishData {
/**
* The custom result data of the common event.
*
* @type { ?string }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
@ -49,6 +52,7 @@ export interface CommonEventPublishData {
/**
* The permissions for subscribers. Only subscribers with required permissions can receive published common events.
*
* @type { ?Array<string> }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
@ -57,6 +61,7 @@ export interface CommonEventPublishData {
/**
* Whether the type of a common event is ordered or not.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
@ -66,6 +71,7 @@ export interface CommonEventPublishData {
/**
* Whether the type of a common event is sticky or not.
*
* @type { ?boolean }
* @default false
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
@ -75,6 +81,7 @@ export interface CommonEventPublishData {
/**
* The description of the parameters in a common event.
*
* @type { ?object }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/

View File

@ -24,6 +24,7 @@ export interface CommonEventSubscribeInfo {
/**
* Indicates the subscribed events.
*
* @type { Array<string> }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
@ -33,6 +34,7 @@ export interface CommonEventSubscribeInfo {
* The permission that the publisher must have in order to send a common event to this subscriber.
* This subscriber receives only common events sent by publishers granted with this permission.
*
* @type { ?string }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
@ -41,6 +43,7 @@ export interface CommonEventSubscribeInfo {
/**
* deviceId Indicates the device ID. The value must be an existing device ID on the same ohos network.
*
* @type { ?string }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
@ -50,6 +53,7 @@ export interface CommonEventSubscribeInfo {
* Indicates the user ID. This parameter is optional, and the default value is the ID of the
* current user. If this parameter is specified, the value must be an existing user ID in the system.
*
* @type { ?number }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/
@ -58,6 +62,7 @@ export interface CommonEventSubscribeInfo {
/**
* Indicates the subscriber priority. The value ranges from -100 to 1000.
*
* @type { ?number }
* @syscap SystemCapability.Notification.CommonEvent
* @since 7
*/

View File

@ -26,6 +26,7 @@ export interface ContinuationExtraParams {
/**
* Indicates the type of devices to be matched.
*
* @type { ?Array<string> }
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
*/
@ -34,6 +35,7 @@ export interface ContinuationExtraParams {
/**
* Indicates the bundle name of the target application where the ability will be hopped.
*
* @type { ?string }
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
*/
@ -42,6 +44,7 @@ export interface ContinuationExtraParams {
/**
* Indicates the description used for device filtering.
*
* @type { ?string }
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
*/
@ -50,6 +53,7 @@ export interface ContinuationExtraParams {
/**
* Parameters used for filtering devices, type must be { [key: string]: any }.
*
* @type { ?any }
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
*/
@ -58,6 +62,7 @@ export interface ContinuationExtraParams {
/**
* Mode of continuation.
*
* @type { ?continuationManager.ContinuationMode }
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
*/
@ -66,6 +71,7 @@ export interface ContinuationExtraParams {
/**
* Authentication extra infos.
*
* @type { ?object }
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
*/

View File

@ -24,6 +24,7 @@ export interface ContinuationResult {
/**
* the information about the selected device id.
*
* @type { string }
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
*/
@ -32,6 +33,7 @@ export interface ContinuationResult {
/**
* the information about the selected device type.
*
* @type { string }
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
*/
@ -40,6 +42,7 @@ export interface ContinuationResult {
/**
* Indicates the name of the selected device.
*
* @type { string }
* @syscap SystemCapability.Ability.DistributedAbilityManager
* @since 8
*/

View File

@ -21,6 +21,21 @@
* @since 9
*/
export interface BundleOption {
/**
* bundle name
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
bundle: string;
/**
* user id.
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
uid?: number;
}

View File

@ -27,6 +27,7 @@ export interface NotificationActionButton {
/**
* Button title.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -35,6 +36,7 @@ export interface NotificationActionButton {
/**
* WantAgent of the button.
*
* @type { WantAgent }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -43,6 +45,7 @@ export interface NotificationActionButton {
/**
* Extra information of the button.
*
* @type { ?object }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -51,6 +54,7 @@ export interface NotificationActionButton {
/**
* User input
*
* @type { ?NotificationUserInput }
* @syscap SystemCapability.Notification.Notification
* @since 8
*/

View File

@ -27,6 +27,7 @@ export interface NotificationBasicContent {
/**
* Title of the normal text notification.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -35,6 +36,7 @@ export interface NotificationBasicContent {
/**
* Content of the normal text notification.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -43,6 +45,7 @@ export interface NotificationBasicContent {
/**
* Additional information of the normal text notification.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -60,6 +63,7 @@ export interface NotificationLongTextContent extends NotificationBasicContent {
/**
* Long text content of the notification.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -68,6 +72,7 @@ export interface NotificationLongTextContent extends NotificationBasicContent {
/**
* Brief text of the long text notification.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -76,6 +81,7 @@ export interface NotificationLongTextContent extends NotificationBasicContent {
/**
* Title that will be displayed for the long text notification when it is expanded.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -93,6 +99,7 @@ export interface NotificationMultiLineContent extends NotificationBasicContent {
/**
* Brief text of the multi-line text notification.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -101,6 +108,7 @@ export interface NotificationMultiLineContent extends NotificationBasicContent {
/**
* Brief text of the multi-line text notification.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -109,6 +117,7 @@ export interface NotificationMultiLineContent extends NotificationBasicContent {
/**
* Multi-line content of the multi-line text notification.
*
* @type { Array<string> }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -126,6 +135,7 @@ export interface NotificationPictureContent extends NotificationBasicContent {
/**
* Multi-line content of the multi-line text notification.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -134,6 +144,7 @@ export interface NotificationPictureContent extends NotificationBasicContent {
/**
* Title that will be displayed for the picture-attached notification when it is expanded.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -142,6 +153,7 @@ export interface NotificationPictureContent extends NotificationBasicContent {
/**
* Picture to be included in a notification.
*
* @type { image.PixelMap }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -159,6 +171,7 @@ export interface NotificationContent {
/**
* Notification content type.
*
* @type { notification.ContentType }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -167,6 +180,7 @@ export interface NotificationContent {
/**
* Normal text notification.
*
* @type { ?NotificationBasicContent }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -175,6 +189,7 @@ export interface NotificationContent {
/**
* Long text notification.
*
* @type { ?NotificationLongTextContent }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -183,6 +198,7 @@ export interface NotificationContent {
/**
* Multi-line text notification.
*
* @type { ?NotificationMultiLineContent }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -191,6 +207,7 @@ export interface NotificationContent {
/**
* Picture-attached notification.
*
* @type { ?NotificationPictureContent }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/

View File

@ -61,6 +61,8 @@ export interface NotificationFlags {
/**
* Whether to enable sound reminder.
*
* @type { ?NotificationFlagStatus }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @since 8
*/
@ -69,6 +71,8 @@ export interface NotificationFlags {
/**
* Whether to enable vibration reminder.
*
* @type { ?NotificationFlagStatus }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @since 8
*/

View File

@ -32,6 +32,7 @@ export interface NotificationRequest {
/**
* Notification content.
*
* @type { NotificationContent }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -40,6 +41,7 @@ export interface NotificationRequest {
/**
* Notification ID.
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -48,6 +50,7 @@ export interface NotificationRequest {
/**
* Notification slot type.
*
* @type { ?notification.SlotType }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -56,6 +59,7 @@ export interface NotificationRequest {
/**
* Whether the notification is an ongoing notification.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -64,6 +68,7 @@ export interface NotificationRequest {
/**
* Whether the notification can be removed.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -72,6 +77,7 @@ export interface NotificationRequest {
/**
* Time when the notification is sent.
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -80,6 +86,7 @@ export interface NotificationRequest {
/**
* Whether the notification is automatically cleared.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -88,6 +95,7 @@ export interface NotificationRequest {
/**
* Time when the notification is automatically cleared.
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -96,6 +104,7 @@ export interface NotificationRequest {
/**
* WantAgent instance to which the notification will be redirected after being clicked.
*
* @type { ?WantAgent }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -104,6 +113,7 @@ export interface NotificationRequest {
/**
* Extended parameter.
*
* @type { ?object }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -112,6 +122,7 @@ export interface NotificationRequest {
/**
* Background color of the notification.
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -120,6 +131,7 @@ export interface NotificationRequest {
/**
* Whether the notification background color can be enabled.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -128,6 +140,7 @@ export interface NotificationRequest {
/**
* Whether the notification triggers an alert only once.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -136,6 +149,7 @@ export interface NotificationRequest {
/**
* Whether to display the stopwatch.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -144,6 +158,7 @@ export interface NotificationRequest {
/**
* Whether to display the countdown time.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -152,6 +167,7 @@ export interface NotificationRequest {
/**
* Whether the notification is displayed as a floating icon.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -160,6 +176,7 @@ export interface NotificationRequest {
/**
* Notification label.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -168,6 +185,7 @@ export interface NotificationRequest {
/**
* Notification badge type.
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -176,6 +194,7 @@ export interface NotificationRequest {
/**
* Whether to display the time when the notification is delivered.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -184,6 +203,7 @@ export interface NotificationRequest {
/**
* Buttons in the notification. Up to two buttons are allowed.
*
* @type { ?Array<NotificationActionButton> }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -192,6 +212,7 @@ export interface NotificationRequest {
/**
* Small notification icon.
*
* @type { ?image.PixelMap }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -200,6 +221,7 @@ export interface NotificationRequest {
/**
* Large notification icon.
*
* @type { ?image.PixelMap }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -208,6 +230,7 @@ export interface NotificationRequest {
/**
* The group information for this notification.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @since 8
*/
@ -216,6 +239,8 @@ export interface NotificationRequest {
/**
* Read-only name of the package for which a notification is created.
*
* @type { ?string }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -224,6 +249,8 @@ export interface NotificationRequest {
/**
* Read-only UID of the notification creator.
*
* @type { ?number }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -232,6 +259,8 @@ export interface NotificationRequest {
/**
* Read-only PID of the notification creator.
*
* @type { ?number }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -240,6 +269,8 @@ export interface NotificationRequest {
/**
* Read-only UserId of the notification creator.
*
* @type { ?number }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @since 8
*/
@ -248,6 +279,8 @@ export interface NotificationRequest {
/**
* Obtains the classification of this notification.
*
* @type { ?string }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
@ -257,6 +290,8 @@ export interface NotificationRequest {
/**
* Obtains the unique hash code of a notification in the current application.
*
* @type { ?string }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -265,7 +300,9 @@ export interface NotificationRequest {
/**
* Whether the notification can be remove.
*
* @type { ?boolean }
* @default true
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
@ -275,6 +312,7 @@ export interface NotificationRequest {
/**
* Notification source. enum SourceType
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
@ -284,6 +322,7 @@ export interface NotificationRequest {
/**
* Obtains the template of this notification.
*
* @type { ?NotificationTemplate }
* @syscap SystemCapability.Notification.Notification
* @since 8
*/
@ -292,6 +331,7 @@ export interface NotificationRequest {
/**
* The options to distributed notification.
*
* @type { ?DistributedOptions }
* @syscap SystemCapability.Notification.Notification
* @since 8
*/
@ -300,6 +340,7 @@ export interface NotificationRequest {
/**
* The device ID of the notification source.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
@ -309,6 +350,7 @@ export interface NotificationRequest {
/**
* Obtains the set of identifiers for the notification.
*
* @type { ?NotificationFlags }
* @syscap SystemCapability.Notification.Notification
* @since 8
*/
@ -317,6 +359,7 @@ export interface NotificationRequest {
/**
* WantAgent instance to which the notification will be redirected when removing notification.
*
* @type { ?WantAgent }
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
@ -325,6 +368,7 @@ export interface NotificationRequest {
/**
* Number of notifications displayed on the app icon.
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @since 9
*/
@ -342,6 +386,7 @@ export interface DistributedOptions {
/**
* Obtains whether is the distributed notification.
*
* @type { ?boolean }
* @default true
* @syscap SystemCapability.Notification.Notification
* @since 8
@ -351,6 +396,7 @@ export interface DistributedOptions {
/**
* Obtains the types of devices to which the notification can be synchronized.
*
* @type { ?Array<string> }
* @syscap SystemCapability.Notification.Notification
* @since 8
*/
@ -359,6 +405,7 @@ export interface DistributedOptions {
/**
* Obtains the devices on which notifications can be open.
*
* @type { ?Array<string> }
* @syscap SystemCapability.Notification.Notification
* @since 8
*/
@ -367,6 +414,7 @@ export interface DistributedOptions {
/**
* Obtains the remind mode of the notification. enum DeviceRemindType.
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8

View File

@ -26,6 +26,7 @@ export interface NotificationSlot {
/**
* Obtains the type of a notification slot.
*
* @type { notification.SlotType }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -34,6 +35,7 @@ export interface NotificationSlot {
/**
* Obtains the level of a notification slot
*
* @type { ?notification.SlotLevel }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -42,6 +44,7 @@ export interface NotificationSlot {
/**
* Obtains the description of a notification slot.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -50,6 +53,7 @@ export interface NotificationSlot {
/**
* Obtains the application icon badge status of a notification slot.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -58,6 +62,7 @@ export interface NotificationSlot {
/**
* Obtains whether DND mode is bypassed for a notification slot.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -66,6 +71,7 @@ export interface NotificationSlot {
/**
* Whether and how to display notifications on the lock screen.
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -74,6 +80,7 @@ export interface NotificationSlot {
/**
* Obtains the vibration status of the notification slot.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -82,6 +89,7 @@ export interface NotificationSlot {
/**
* Obtains the prompt tone of the notification slot.
*
* @type { ?string }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -90,6 +98,7 @@ export interface NotificationSlot {
/**
* Obtains whether the notification light is enabled in a notification slot.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -98,6 +107,7 @@ export interface NotificationSlot {
/**
* Obtains the color of the notification light in a notification slot.
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -106,6 +116,7 @@ export interface NotificationSlot {
/**
* Obtains the vibration style of notifications in this notification slot.
*
* @type { ?Array<number> }
* @syscap SystemCapability.Notification.Notification
* @since 7
*/
@ -114,6 +125,7 @@ export interface NotificationSlot {
/**
* Read-only enabled status in this notification slot.
*
* @type { ?boolean }
* @syscap SystemCapability.Notification.Notification
* @since 9
*/

View File

@ -24,7 +24,36 @@ import { NotificationSlot } from './notificationSlot';
* @since 7
*/
export interface NotificationSorting {
/**
* Notify the channel content.
*
* @type { NotificationSlot }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
readonly slot: NotificationSlot;
/**
* Notify the unique ID.
*
* @type { string }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
readonly hashCode: string;
/**
* Notify the sort number.
*
* @type { number }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
readonly ranking: number;
}

View File

@ -24,6 +24,25 @@ import { NotificationSorting } from './notificationSorting';
* @since 7
*/
interface NotificationSortingMap {
/**
* An array of notification sort information.
*
* @type { object }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
readonly sortings: { [key: string]: NotificationSorting };
/**
* Notification unique identification array.
*
* @type { Array<string> }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
readonly sortedHashCode: Array<string>;
}

View File

@ -22,6 +22,23 @@
* @since 7
*/
export interface NotificationSubscribeInfo {
/**
* Notifications from APP that specify which package names to subscribe to.
*
* @type { ?Array<string> }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
bundleNames?: Array<string>;
/**
* Specify which user to subscribe to the notification from.
*
* @type { ?number }
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
userId?: number;
}

View File

@ -27,11 +27,58 @@ import notification from '../@ohos.notification';
* @since 7
*/
export interface NotificationSubscriber {
/**
* The callback function that receives a new notification.
*
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
*/
onConsume?: (data: SubscribeCallbackData) => void;
/**
* The callback function that cancels the notification.
*
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
*/
onCancel?: (data: SubscribeCallbackData) => void;
/**
* The callback function that updates the sort of notifications.
*
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
*/
onUpdate?: (data: NotificationSortingMap) => void;
/**
* The callback function of the completed subscription.
*
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
*/
onConnect?: () => void;
/**
* The callback function to unsubscribe.
*
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
*/
onDisconnect?: () => void;
/**
* The callback function that ervice disconnected.
*
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
*/
onDestroy?: () => void;
/**
@ -72,10 +119,59 @@ export interface NotificationSubscriber {
* @since 7
*/
export interface SubscribeCallbackData {
/**
* Content of the notice.
*
* @type { NotificationRequest }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
readonly request: NotificationRequest;
/**
* Notify sorting information.
*
* @type { ?NotificationSortingMap }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
readonly sortingMap?: NotificationSortingMap;
/**
* Delete the reason.
*
* @type { ?number }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
readonly reason?: number;
/**
* Notification sound.
*
* @type { ?string }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
readonly sound?: string;
/**
* Notice the vibration.
*
* @type { ?Array<number> }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 7
*/
readonly vibrationValues?: Array<number>;
}
@ -88,8 +184,37 @@ export interface SubscribeCallbackData {
* @since 8
*/
export interface EnabledNotificationCallbackData {
/**
* The bundle name of the application.
*
* @type { string }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
*/
readonly bundle: string;
/**
* The uid of the application.
*
* @type { number }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
*/
readonly uid: number;
/**
* Apply notification enable status.
*
* @type { boolean }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 8
*/
readonly enable: boolean;
}
@ -102,7 +227,36 @@ export interface EnabledNotificationCallbackData {
* @since 10
*/
export interface BadgeNumberCallbackData {
/**
* bundle name
*
* @type { string }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
*/
readonly bundle: string;
/**
* The uid of the application.
*
* @type { number }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
*/
readonly uid: number;
/**
* badge number
*
* @type { number }
* @readonly
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
*/
readonly badgeNumber: number;
}

View File

@ -24,6 +24,7 @@ export interface NotificationTemplate {
/**
* Obtains the type of a notification template.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 8
*/
@ -32,6 +33,7 @@ export interface NotificationTemplate {
/**
* Obtains the data of a notification template.
*
* @type { object }
* @syscap SystemCapability.Notification.Notification
* @since 8
*/

View File

@ -24,6 +24,7 @@ export interface NotificationUserInput {
/**
* Obtains the key used to identify this input when the input is collected from the user.
*
* @type { string }
* @syscap SystemCapability.Notification.Notification
* @since 8
*/

View File

@ -26,6 +26,7 @@ export interface TriggerInfo {
/**
* Result code.
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/
@ -39,6 +40,7 @@ export interface TriggerInfo {
* will be used to replace the corresponding attributes in the original Want, respectively.
* If this parameter is null, the original Want remains unchanged.
*
* @type { ?Want }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/
@ -49,6 +51,7 @@ export interface TriggerInfo {
* This parameter is valid only when the WantAgent is triggered to send common events.
* If permission is null, no permission is required on the recipient.
*
* @type { ?string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/
@ -57,6 +60,7 @@ export interface TriggerInfo {
/**
* Custom extra data you want to add for triggering a WantAgent.
*
* @type { ?object }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/

View File

@ -27,6 +27,7 @@ export interface WantAgentInfo {
/**
* An array of all Wants for starting abilities or sending common events. Only Wants can be displayed.
*
* @type { Array<Want> }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/
@ -35,6 +36,7 @@ export interface WantAgentInfo {
/**
* Type of the action specified in a Want.
*
* @type { wantAgent.OperationType }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/
@ -43,6 +45,7 @@ export interface WantAgentInfo {
/**
* Request code defined by the user.
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/
@ -51,6 +54,7 @@ export interface WantAgentInfo {
/**
* An array of flags for using the WantAgent.
*
* @type { ?Array<wantAgent.WantAgentFlags> }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/
@ -60,6 +64,7 @@ export interface WantAgentInfo {
* Extra information about how the Want starts an ability.
* If there is no extra information to set, this constant can be left empty.
*
* @type { ?object }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/