提交 c22bf929 编写于 作者: G Gloria 提交者: wusongqing

fixed 5b118770 from https://gitee.com/wusongqing/docs/pulls/14059

Update docs against 13745 and more

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 f15cb27c
......@@ -4,70 +4,70 @@
- Ability Framework
- Stage Model (Recommended)
- [@ohos.app.ability.Ability](js-apis-app-ability-ability.md)
- [@ohos.app.ability.AbilityConstant](js-apis-app-ability-abilityConstant.md)
- [@ohos.app.ability.abilityLifecycleCallback](js-apis-app-ability-abilityLifecycleCallback.md)
- [@ohos.app.ability.AbilityStage](js-apis-app-ability-abilityStage.md)
- [@ohos.app.ability.common](js-apis-app-ability-common.md)
- [@ohos.app.ability.contextConstant](js-apis-app-ability-contextConstant.md)
- [@ohos.app.ability.EnvironmentCallback](js-apis-app-ability-environmentCallback.md)
- [@ohos.app.ability.ExtensionAbility](js-apis-app-ability-extensionAbility.md)
- [@ohos.app.ability.ServiceExtensionAbility](js-apis-app-ability-serviceExtensionAbility.md)
- [@ohos.app.ability.StartOptions](js-apis-app-ability-startOptions.md)
- [@ohos.app.ability.UIAbility](js-apis-app-ability-uiAbility.md)
- [@ohos.app.form.FormExtensionAbility](js-apis-app-form-formExtensionAbility.md)
- [@ohos.application.DataShareExtensionAbility](js-apis-application-dataShareExtensionAbility.md)
- [@ohos.application.StaticSubscriberExtensionAbility](js-apis-application-staticSubscriberExtensionAbility.md)
- [@ohos.app.ability.Ability (Ability Base Class)](js-apis-app-ability-ability.md)
- [@ohos.app.ability.AbilityConstant (AbilityConstant)](js-apis-app-ability-abilityConstant.md)
- [@ohos.app.ability.abilityLifecycleCallback (AbilityLifecycleCallback)](js-apis-app-ability-abilityLifecycleCallback.md)
- [@ohos.app.ability.AbilityStage (AbilityStage)](js-apis-app-ability-abilityStage.md)
- [@ohos.app.ability.common (Context)](js-apis-app-ability-common.md)
- [@ohos.app.ability.contextConstant (ContextConstant)](js-apis-app-ability-contextConstant.md)
- [@ohos.app.ability.EnvironmentCallback (EnvironmentCallback)](js-apis-app-ability-environmentCallback.md)
- [@ohos.app.ability.ExtensionAbility (ExtensionAbility Base Class)](js-apis-app-ability-extensionAbility.md)
- [@ohos.app.ability.ServiceExtensionAbility (ServiceExtensionAbility)](js-apis-app-ability-serviceExtensionAbility.md)
- [@ohos.app.ability.StartOptions (StartOptions)](js-apis-app-ability-startOptions.md)
- [@ohos.app.ability.UIAbility (UIAbility)](js-apis-app-ability-uiAbility.md)
- [@ohos.app.form.FormExtensionAbility (FormExtensionAbility)](js-apis-app-form-formExtensionAbility.md)
- [@ohos.application.DataShareExtensionAbility (DataShare Extension Ability)](js-apis-application-dataShareExtensionAbility.md)
- [@ohos.application.StaticSubscriberExtensionAbility (StaticSubscriberExtensionAbility)](js-apis-application-staticSubscriberExtensionAbility.md)
- Stage Model (To Be Deprecated Soon)
- [@ohos.application.Ability](js-apis-application-ability.md)
- [@ohos.application.AbilityConstant](js-apis-application-abilityConstant.md)
- [@ohos.application.AbilityLifecycleCallback](js-apis-application-abilityLifecycleCallback.md)
- [@ohos.application.AbilityStage](js-apis-application-abilityStage.md)
- [@ohos.application.context](js-apis-application-context.md)
- [@ohos.application.EnvironmentCallback](js-apis-application-environmentCallback.md)
- [@ohos.application.ExtensionAbility](js-apis-application-extensionAbility.md)
- [@ohos.application.FormExtension](js-apis-application-formExtension.md)
- [@ohos.application.ServiceExtensionAbility](js-apis-application-serviceExtensionAbility.md)
- [@ohos.application.StartOptions](js-apis-application-startOptions.md)
- [@ohos.application.Ability (Ability)](js-apis-application-ability.md)
- [@ohos.application.AbilityConstant (AbilityConstant)](js-apis-application-abilityConstant.md)
- [@ohos.application.AbilityLifecycleCallback (AbilityLifecycleCallback)](js-apis-application-abilityLifecycleCallback.md)
- [@ohos.application.AbilityStage (AbilityStage)](js-apis-application-abilityStage.md)
- [@ohos.application.context (Context)](js-apis-application-context.md)
- [@ohos.application.EnvironmentCallback (EnvironmentCallback)](js-apis-application-environmentCallback.md)
- [@ohos.application.ExtensionAbility (ExtensionAbility)](js-apis-application-extensionAbility.md)
- [@ohos.application.FormExtension (FormExtension)](js-apis-application-formExtension.md)
- [@ohos.application.ServiceExtensionAbility (ServiceExtensionAbility)](js-apis-application-serviceExtensionAbility.md)
- [@ohos.application.StartOptions (StartOptions)](js-apis-application-startOptions.md)
- FA Model
- [@ohos.ability.ability](js-apis-ability-ability.md)
- [@ohos.ability.featureAbility](js-apis-ability-featureAbility.md)
- [@ohos.ability.particleAbility](js-apis-ability-particleAbility.md)
- [@ohos.ability.ability (Ability)](js-apis-ability-ability.md)
- [@ohos.ability.featureAbility (FeatureAbility)](js-apis-ability-featureAbility.md)
- [@ohos.ability.particleAbility (ParticleAbility)](js-apis-ability-particleAbility.md)
- Both Models (Recommended)
- [@ohos.app.ability.abilityDelegatorRegistry](js-apis-app-ability-abilityDelegatorRegistry.md)
- [@ohos.app.ability.abilityManager](js-apis-app-ability-abilityManager.md)
- [@ohos.app.ability.appManager](js-apis-app-ability-appManager.md)
- [@ohos.app.ability.appRecovery](js-apis-app-ability-appRecovery.md)
- [@ohos.app.ability.Configuration](js-apis-app-ability-configuration.md)
- [@ohos.app.ability.ConfigurationConstant](js-apis-app-ability-configurationConstant.md)
- [@ohos.app.ability.errorManager](js-apis-app-ability-errorManager.md)
- [@ohos.app.ability.missionManager](js-apis-app-ability-missionManager.md)
- [@ohos.app.ability.quickFixManager](js-apis-app-ability-quickFixManager.md)
- [@ohos.app.ability.Want](js-apis-app-ability-want.md)
- [@ohos.app.ability.wantAgent](js-apis-app-ability-wantAgent.md)
- [@ohos.app.ability.wantConstant](js-apis-app-ability-wantConstant.md)
- [@ohos.app.form.formBindingData](js-apis-app-form-formBindingData.md)
- [@ohos.app.form.formHost](js-apis-app-form-formHost.md)
- [@ohos.app.form.formInfo](js-apis-app-form-formInfo.md)
- [@ohos.app.form.formProvider](js-apis-app-form-formProvider.md)
- [@ohos.app.ability.abilityDelegatorRegistry (AbilityDelegatorRegistry)](js-apis-app-ability-abilityDelegatorRegistry.md)
- [@ohos.app.ability.abilityManager (AbilityManager)](js-apis-app-ability-abilityManager.md)
- [@ohos.app.ability.appManager (appManager)](js-apis-app-ability-appManager.md)
- [@ohos.app.ability.appRecovery (appRecovery)](js-apis-app-ability-appRecovery.md)
- [@ohos.app.ability.Configuration (Configuration)](js-apis-app-ability-configuration.md)
- [@ohos.app.ability.ConfigurationConstant (ConfigurationConstant)](js-apis-app-ability-configurationConstant.md)
- [@ohos.app.ability.errorManager (ErrorManager)](js-apis-app-ability-errorManager.md)
- [@ohos.app.ability.missionManager (missionManager)](js-apis-app-ability-missionManager.md)
- [@ohos.app.ability.quickFixManager (quickFixManager)](js-apis-app-ability-quickFixManager.md)
- [@ohos.app.ability.Want (Want)](js-apis-app-ability-want.md)
- [@ohos.app.ability.wantAgent (WantAgent)](js-apis-app-ability-wantAgent.md)
- [@ohos.app.ability.wantConstant (wantConstant)](js-apis-app-ability-wantConstant.md)
- [@ohos.app.form.formBindingData (formBindingData)](js-apis-app-form-formBindingData.md)
- [@ohos.app.form.formHost (FormHost)](js-apis-app-form-formHost.md)
- [@ohos.app.form.formInfo (FormInfo)](js-apis-app-form-formInfo.md)
- [@ohos.app.form.formProvider (FormProvider)](js-apis-app-form-formProvider.md)
- Both Models (To Be Deprecated Soon)
- [@ohos.ability.dataUriUtils](js-apis-ability-dataUriUtils.md)
- [@ohos.ability.errorCode](js-apis-ability-errorCode.md)
- [@ohos.ability.wantConstant](js-apis-ability-wantConstant.md)
- [@ohos.application.abilityDelegatorRegistry](js-apis-application-abilityDelegatorRegistry.md)
- [@ohos.application.abilityManager](js-apis-application-abilityManager.md)
- [@ohos.application.appManager](js-apis-application-appManager.md)
- [@ohos.application.Configuration](js-apis-application-configuration.md)
- [@ohos.application.ConfigurationConstant](js-apis-application-configurationConstant.md)
- [@ohos.application.errorManager)](js-apis-application-errorManager.md)
- [@ohos.application.formBindingData](js-apis-application-formBindingData.md)
- [@ohos.application.formError](js-apis-application-formError.md)
- [@ohos.application.formHost](js-apis-application-formHost.md)
- [@ohos.application.formInfo](js-apis-application-formInfo.md)
- [@ohos.application.formProvider](js-apis-application-formProvider.md)
- [@ohos.application.missionManager](js-apis-application-missionManager.md)
- [@ohos.application.Want](js-apis-application-want.md)
- [@ohos.wantAgent](js-apis-wantAgent.md)
- [@ohos.ability.dataUriUtils (DataUriUtils)](js-apis-ability-dataUriUtils.md)
- [@ohos.ability.errorCode (ErrorCode)](js-apis-ability-errorCode.md)
- [@ohos.ability.wantConstant (wantConstant)](js-apis-ability-wantConstant.md)
- [@ohos.application.abilityDelegatorRegistry (AbilityDelegatorRegistry)](js-apis-application-abilityDelegatorRegistry.md)
- [@ohos.application.abilityManager (AbilityManager)](js-apis-application-abilityManager.md)
- [@ohos.application.appManager (appManager)](js-apis-application-appManager.md)
- [@ohos.application.Configuration (Configuration)](js-apis-application-configuration.md)
- [@ohos.application.ConfigurationConstant (ConfigurationConstant)](js-apis-application-configurationConstant.md)
- [@ohos.application.errorManager (ErrorManager)](js-apis-application-errorManager.md)
- [@ohos.application.formBindingData (formBindingData)](js-apis-application-formBindingData.md)
- [@ohos.application.formError (FormError)](js-apis-application-formError.md)
- [@ohos.application.formHost (FormHost)](js-apis-application-formHost.md)
- [@ohos.application.formInfo (FormInfo)](js-apis-application-formInfo.md)
- [@ohos.application.formProvider (FormProvider)](js-apis-application-formProvider.md)
- [@ohos.application.missionManager (missionManager)](js-apis-application-missionManager.md)
- [@ohos.application.Want (Want)](js-apis-application-want.md)
- [@ohos.wantAgent (WantAgent)](js-apis-wantAgent.md)
- Dependent Elements and Definitions
- ability
- [abilityResult](js-apis-inner-ability-abilityResult.md)
......@@ -107,7 +107,6 @@
- [MissionListener](js-apis-inner-application-missionListener.md)
- [MissionParameter](js-apis-inner-application-missionParameter.md)
- [MissionSnapshot](js-apis-inner-application-missionSnapshot.md)
- [PermissionRequestResult](js-apis-inner-application-permissionRequestResult.md)
- [ProcessData](js-apis-inner-application-processData.md)
- [ProcessRunningInfo](js-apis-inner-application-processRunningInfo.md)
- [ProcessRunningInformation](js-apis-inner-application-processRunningInformation.md)
......@@ -122,26 +121,26 @@
- continuation
- [continuationExtraParams](js-apis-continuation-continuationExtraParams.md)
- [continuationResult](js-apis-continuation-continuationResult.md)
- Common Event and Notification
- [@ohos.commonEventManager (Recommended)](js-apis-commonEventManager.md)
- [@ohos.events.emitter](js-apis-emitter.md)
- [@ohos.notificationManager (Recommended)](js-apis-notificationManager.md)
- [@ohos.notificationSubscribe (Recommended)](js-apis-notificationSubscribe.md)
- [@ohos.commonEvent (To Be Deprecated Soon)](js-apis-commonEvent.md)
- [@ohos.notification](js-apis-notification.md)
- [@ohos.commonEventManager (Common Event) (Recommended)](js-apis-commonEventManager.md)
- [@ohos.events.emitter (Emitter)](js-apis-emitter.md)
- [@ohos.notificationManager (NotificationManager) (Recommended)](js-apis-notificationManager.md)
- [@ohos.notificationSubscribe (NotificationSubscribe) (Recommended)](js-apis-notificationSubscribe.md)
- [@ohos.commonEvent (Common Event) (To Be Deprecated Soon)](js-apis-commonEvent.md)
- [@ohos.notification (Notification) (To Be Deprecated Soon)](js-apis-notification.md)
- application
- [EventHub](js-apis-inner-application-eventHub.md)
- Bundle Management
- [@ohos.bundle.appControl](js-apis-appControl.md)
- [@ohos.bundle.bundleManager](js-apis-bundleManager.md)
- [@ohos.bundle.bundleMonitor](js-apis-bundleMonitor.md)
- [@ohos.bundle.defaultAppManager](js-apis-defaultAppManager.md)
- [@ohos.bundle.distributedBundle](js-apis-distributedBundle.md)
- [@ohos.bundle.freeInstall](js-apis-freeInstall.md)
- [@ohos.bundle.installer](js-apis-installer.md)
- [@ohos.bundle.launcherBundleManager](js-apis-launcherBundleManager.md)
- [@ohos.zlib](js-apis-zlib.md)
- [@ohos.bundle.appControl (appControl)](js-apis-appControl.md)
- [@ohos.bundle.bundleManager (bundleManager)](js-apis-bundleManager.md)
- [@ohos.bundle.bundleMonitor (bundleMonitor)](js-apis-bundleMonitor.md)
- [@ohos.bundle.defaultAppManager (Default Application Management)](js-apis-defaultAppManager.md)
- [@ohos.bundle.distributedBundleManager (distributedBundleManager)](js-apis-distributedBundleManager.md)
- [@ohos.bundle.freeInstall (freeInstall)](js-apis-freeInstall.md)
- [@ohos.bundle.installer (installer)](js-apis-installer.md)
- [@ohos.bundle.launcherBundleManager (launcherBundleManager)](js-apis-launcherBundleManager.md)
- [@ohos.zlib (Zip)](js-apis-zlib.md)
- bundleManager
- [abilityInfo](js-apis-bundleManager-abilityInfo.md)
- [applicationInfo](js-apis-bundleManager-applicationInfo.md)
......@@ -157,41 +156,41 @@
- [remoteAbilityInfo](js-apis-bundleManager-remoteAbilityInfo.md)
- [shortcutInfo](js-apis-bundleManager-shortcutInfo.md)
- UI Page
- [@ohos.animator](js-apis-animator.md)
- [@ohos.curves](js-apis-curve.md)
- [@ohos.matrix4](js-apis-matrix4.md)
- [@ohos.mediaquery](js-apis-mediaquery.md)
- [@ohos.promptAction](js-apis-promptAction.md)
- [@ohos.router](js-apis-router.md)
- [@ohos.animator (Animator)](js-apis-animator.md)
- [@ohos.curves (Interpolation Calculation)](js-apis-curve.md)
- [@ohos.matrix4 (Matrix Transformation)](js-apis-matrix4.md)
- [@ohos.mediaquery (Media Query)](js-apis-mediaquery.md)
- [@ohos.promptAction (Prompt)](js-apis-promptAction.md)
- [@ohos.router (Page Routing)](js-apis-router.md)
- Graphics
- [@ohos.animation.windowAnimationManager](js-apis-windowAnimationManager.md)
- [@ohos.application.WindowExtensionAbility](js-apis-application-windowExtensionAbility.md)
- [@ohos.display ](js-apis-display.md)
- [@ohos.effectKit](js-apis-effectKit.md)
- [@ohos.graphics.colorSpaceManager](js-apis-colorSpaceManager.md)
- [@ohos.screen](js-apis-screen.md)
- [@ohos.screenshot](js-apis-screenshot.md)
- [@ohos.window](js-apis-window.md)
- [@ohos.animation.windowAnimationManager (Window Animation Management)](js-apis-windowAnimationManager.md)
- [@ohos.application.WindowExtensionAbility (WindowExtensionAbility)](js-apis-application-windowExtensionAbility.md)
- [@ohos.display (Display)](js-apis-display.md)
- [@ohos.effectKit (Image Effects)](js-apis-effectKit.md)
- [@ohos.graphics.colorSpaceManager (Color Space Management)](js-apis-colorSpaceManager.md)
- [@ohos.screen (Screen)](js-apis-screen.md)
- [@ohos.screenshot (Screenshot)](js-apis-screenshot.md)
- [@ohos.window (Window)](js-apis-window.md)
- webgl
- [webgl](js-apis-webgl.md)
- [webgl2](js-apis-webgl2.md)
- [WebGL](js-apis-webgl.md)
- [WebGL2](js-apis-webgl2.md)
- Media
- [@ohos.multimedia.audio](js-apis-audio.md)
- [@ohos.multimedia.avsession](js-apis-avsession.md)
- [@ohos.multimedia.camera](js-apis-camera.md)
- [@ohos.multimedia.image](js-apis-image.md)
- [@ohos.multimedia.media](js-apis-media.md)
- [@ohos.multimedia.audio (Audio Management)](js-apis-audio.md)
- [@ohos.multimedia.avsession (AVSession Management)](js-apis-avsession.md)
- [@ohos.multimedia.camera (Camera Management)](js-apis-camera.md)
- [@ohos.multimedia.image (Image Processing)](js-apis-image.md)
- [@ohos.multimedia.media (Media)](js-apis-media.md)
- Resource Management
- [@ohos.i18n](js-apis-i18n.md)
- [@ohos.intl](js-apis-intl.md)
- [@ohos.resourceManager](js-apis-resource-manager.md)
- [@ohos.i18n (Internationalization)](js-apis-i18n.md)
- [@ohos.intl (Internationalization)](js-apis-intl.md)
- [@ohos.resourceManager (Resource Manager)](js-apis-resource-manager.md)
- Resource Scheduling
- [@ohos.distributedMissionManager](js-apis-distributedMissionManager.md)
- [@ohos.reminderAgentManager](js-apis-reminderAgentManager.md)
- [@ohos.resourceschedule.backgroundTaskManager](js-apis-resourceschedule-backgroundTaskManager.md)
- [@ohos.resourceschedule.workScheduler](js-apis-resourceschedule-workScheduler.md)
- [@ohos.resourceschedule.usageStatistics](js-apis-resourceschedule-deviceUsageStatistics.md)
- [@ohos.WorkSchedulerExtensionAbility](js-apis-WorkSchedulerExtensionAbility.md)
- [@ohos.distributedMissionManager (Distributed Mission Management)](js-apis-distributedMissionManager.md)
- [@ohos.reminderAgentManager (Reminder Agent Management)](js-apis-reminderAgentManager.md)
- [@ohos.resourceschedule.backgroundTaskManager (Background Task Management)](js-apis-resourceschedule-backgroundTaskManager.md)
- [@ohos.resourceschedule.workScheduler (Work Scheduler)](js-apis-resourceschedule-workScheduler.md)
- [@ohos.resourceschedule.usageStatistics (Device Usage Statistics)](js-apis-resourceschedule-deviceUsageStatistics.md)
- [@ohos.WorkSchedulerExtensionAbility (Work Scheduler Callbacks)](js-apis-WorkSchedulerExtensionAbility.md)
- Security
- [@ohos.abilityAccessCtrl (Ability Access Control)](js-apis-abilityAccessCtrl.md)
- [@ohos.privacyManager (Privacy Management)](js-apis-privacyManager.md)
......@@ -201,6 +200,8 @@
- [@ohos.userIAM.faceAuth (Facial Authentication)](js-apis-useriam-faceauth.md)
- [@ohos.userIAM.userAuth (User Authentication)](js-apis-useriam-userauth.md)
- [@system.cipher (Cipher Algorithm)](js-apis-system-cipher.md)
- security
- [PermissionRequestResult](js-apis-permissionrequestresult.md)
- Data Management
- [@ohos.data.dataAbility (DataAbility Predicates)](js-apis-data-ability.md)
- [@ohos.data.dataShare (DataShare)](js-apis-data-dataShare.md)
......@@ -209,183 +210,181 @@
- [@ohos.data.distributedDataObject (Distributed Data Object)](js-apis-data-distributedobject.md)
- [@ohos.data.distributedKVStore (Distributed KV Store)](js-apis-distributedKVStore.md)
- [@ohos.data.preferences (Preferences)](js-apis-data-preferences.md)
- [@ohos.data.relationalStore (RDB Store)](js-apis-data-relationalStore.md)
- [@ohos.data.relationalStore (ϵݿ)](js-apis-data-relationalStore.md)
- [@ohos.data.ValuesBucket (Value Bucket)](js-apis-data-valuesBucket.md)
- data/rdb
- [resultSet](js-apis-data-resultset.md)
- File Management
- [@ohos.document](js-apis-document.md)
- [@ohos.environment](js-apis-environment.md)
- [@ohos.data.fileAccess](js-apis-fileAccess.md)
- [@ohos.fileExtensionInfo](js-apis-fileExtensionInfo.md)
- [@ohos.fileio](js-apis-fileio.md)
- [@ohos.filemanagement.userFileManager](js-apis-userFileManager.md)
- [@ohos.multimedia.medialibrary](js-apis-medialibrary.md)
- [@ohos.securityLabel](js-apis-securityLabel.md)
- [@ohos.statfs](js-apis-statfs.md)
- [@ohos.storageStatistics](js-apis-storage-statistics.md)
- [@ohos.volumeManager](js-apis-volumemanager.md)
- [@ohos.environment (Environment)](js-apis-environment.md)
- [@ohos.file.fileAccess (User File Access and Management)](js-apis-fileAccess.md)
- [@ohos.file.fileExtensionInfo (User File Extension Information)](js-apis-fileExtensionInfo.md)
- [@ohos.filemanagement.userFileManager (User Data Management)](js-apis-userFileManager.md)
- [@ohos.multimedia.medialibrary (Media Library Management)](js-apis-medialibrary.md)
- [@ohos.storageStatistics (Application Storage Statistics)](js-apis-storage-statistics.md)
- [@ohos.volumeManager (Volume Management)](js-apis-volumemanager.md)
- Telephony Service
- [@ohos.contact](js-apis-contact.md)
- [@ohos.telephony.call](js-apis-call.md)
- [@ohos.telephony.data](js-apis-telephony-data.md)
- [@ohos.telephony.observer](js-apis-observer.md)
- [@ohos.telephony.radio](js-apis-radio.md)
- [@ohos.telephony.sim](js-apis-sim.md)
- [@ohos.telephony.sms](js-apis-sms.md)
- [@ohos.contact (Contacts)](js-apis-contact.md)
- [@ohos.telephony.call (Call)](js-apis-call.md)
- [@ohos.telephony.data (Cellular Data)](js-apis-telephony-data.md)
- [@ohos.telephony.observer (Observer)](js-apis-observer.md)
- [@ohos.telephony.radio (Network Search)](js-apis-radio.md)
- [@ohos.telephony.sim (SIM Management)](js-apis-sim.md)
- [@ohos.telephony.sms (SMS)](js-apis-sms.md)
- Network Management
- [@ohos.net.connection](js-apis-net-connection.md)
- [@ohos.net.ethernet](js-apis-net-ethernet.md)
- [@ohos.net.http](js-apis-http.md)
- [@ohos.net.sharing](js-apis-net-sharing.md)
- [@ohos.net.socket](js-apis-socket.md)
- [@ohos.net.webSocket](js-apis-webSocket.md)
- [@ohos.request](js-apis-request.md)
- [@ohos.net.connection (Network Connection Management)](js-apis-net-connection.md)
- [@ohos.net.ethernet (Ethernet Connection Management)](js-apis-net-ethernet.md)
- [@ohos.net.http (Data Request)](js-apis-http.md)
- [@ohos.net.sharing (Network Sharing)](js-apis-net-sharing.md)
- [@ohos.net.socket (Socket Connection)](js-apis-socket.md)
- [@ohos.net.webSocket (WebSocket Connection)](js-apis-webSocket.md)
- [@ohos.request (Upload and Download)](js-apis-request.md)
- Connectivity
- [@ohos.bluetooth](js-apis-bluetooth.md)
- [@ohos.connectedTag](js-apis-connectedTag.md)
- [@ohos.nfc.cardEmulation](js-apis-cardEmulation.md)
- [@ohos.nfc.controller](js-apis-nfcController.md)
- [@ohos.nfc.tag](js-apis-nfcTag.md)
- [@ohos.rpc](js-apis-rpc.md)
- [@ohos.bluetooth (Bluetooth)](js-apis-bluetooth.md)
- [@ohos.connectedTag (Active Tags)](js-apis-connectedTag.md)
- [@ohos.nfc.cardEmulation (Standard NFC Card Emulation)](js-apis-cardEmulation.md)
- [@ohos.nfc.controller (Standard NFC)](js-apis-nfcController.md)
- [@ohos.nfc.tag (Standard NFC Tags)](js-apis-nfcTag.md)
- [@ohos.rpc (RPC)](js-apis-rpc.md)
- [@ohos.wifiManager (WLAN)](js-apis-wifiManager.md)
- [@ohos.wifiManagerExt](js-apis-wifiManagerExt.md)
- [@ohos.wifi](js-apis-wifi.md)
- [@ohos.wifiext](js-apis-wifiext.md)
- [@ohos.wifiManagerExt (WLAN Extension)](js-apis-wifiManagerExt.md)
- [@ohos.wifi (To Be Deprecated)](js-apis-wifi.md)
- [@ohos.wifiext (To Be Deprecated)](js-apis-wifiext.md)
- tag
- [nfctech](js-apis-nfctech.md)
- [tagSession](js-apis-tagSession.md)
- [nfctech (Standard NFC Technologies)](js-apis-nfctech.md)
- [tagSession (Standard NFC Tag Session)](js-apis-tagSession.md)
- Basic Features
- [@ohos.accessibility](js-apis-accessibility.md)
- [@ohos.accessibility.config](js-apis-accessibility-config.md)
- [@ohos.accessibility.GesturePat](js-apis-accessibility-GesturePath.md)
- [@ohos.accessibility.GesturePoint](js-apis-accessibility-GesturePoint.md)
- [@ohos.application.AccessibilityExtensionAbility](js-apis-application-accessibilityExtensionAbility.md)
- [@ohos.faultLogger](js-apis-faultLogger.md)
- [@ohos.hichecker](js-apis-hichecker.md)
- [@ohos.hidebug](js-apis-hidebug.md)
- [@ohos.hilog](js-apis-hilog.md)
- [@ohos.hiSysEvent](js-apis-hisysevent.md)
- [@ohos.hiTraceChain](js-apis-hitracechain.md)
- [@ohos.hiTraceMeter](js-apis-hitracemeter.md)
- [@ohos.hiviewdfx.hiAppEvent](js-apis-hiviewdfx-hiappevent.md)
- [@ohos.inputmethod](js-apis-inputmethod.md)
- [@ohos.inputmethodengine](js-apis-inputmethodengine.md)
- [@ohos.inputmethodextensionability](js-apis-inputmethod-extension-ability.md)
- [@ohos.inputmethodextensioncontext](js-apis-inputmethod-extension-context.md)
- [@ohos.inputmethodsubtype](js-apis-inputmethod-subtype.md)
- [@ohos.pasteboard](js-apis-pasteboard.md)
- [@ohos.screenLock](js-apis-screen-lock.md)
- [@ohos.systemTime](js-apis-system-time.md)
- [@ohos.systemTimer](js-apis-system-timer.md)
- [@ohos.wallpaper](js-apis-wallpaper.md)
- [@ohos.web.webview](js-apis-webview.md)
- [console](js-apis-logs.md)
- [@ohos.accessibility (Accessibility)](js-apis-accessibility.md)
- [@ohos.accessibility.config (System Accessibility Configuration)](js-apis-accessibility-config.md)
- [@ohos.accessibility.GesturePath (Gesture Path)](js-apis-accessibility-GesturePath.md)
- [@ohos.accessibility.GesturePoint (Gesture Point)](js-apis-accessibility-GesturePoint.md)
- [@ohos.application.AccessibilityExtensionAbility (AccessibilityExtensionAbility)](js-apis-application-accessibilityExtensionAbility.md)
- [@ohos.faultLogger (FaultLogger)](js-apis-faultLogger.md)
- [@ohos.hichecker (HiChecker)](js-apis-hichecker.md)
- [@ohos.hidebug (HiDebug)](js-apis-hidebug.md)
- [@ohos.hilog (HiLog)](js-apis-hilog.md)
- [@ohos.hiSysEvent (System Event Logging)](js-apis-hisysevent.md)
- [@ohos.hiTraceChain (Distributed Call Chain Tracing)](js-apis-hitracechain.md)
- [@ohos.hiTraceMeter (Performance Tracing)](js-apis-hitracemeter.md)
- [@ohos.hiviewdfx.hiAppEvent (Application Event Logging)](js-apis-hiviewdfx-hiappevent.md)
- [@ohos.inputMethod (Input Method Framework)](js-apis-inputmethod.md)
- [@ohos.inputMethodEngine (Input Method Service)](js-apis-inputmethodengine.md)
- [@ohos.InputMethodExtensionAbility (InputMethodExtensionAbility)](js-apis-inputmethod-extension-ability.md)
- [@ohos.InputMethodExtensionContext (InputMethodExtensionContext)](js-apis-inputmethod-extension-context.md)
- [@ohos.InputMethodSubtype (Input Method Subtype)](js-apis-inputmethod-subtype.md)
- [@ohos.pasteboard (Pasteboard)](js-apis-pasteboard.md)
- [@ohos.screenLock (Screenlock)](js-apis-screen-lock.md)
- [@ohos.systemTime (System Time and Time Zone)](js-apis-system-time.md)
- [@ohos.systemTimer (System Timer)](js-apis-system-timer.md)
- [@ohos.wallpaper (Wallpaper)](js-apis-wallpaper.md)
- [@ohos.web.webview (Webview)](js-apis-webview.md)
- [console (Log)](js-apis-logs.md)
- [Timer](js-apis-timer.md)
- application
- [AccessibilityExtensionContext](js-apis-inner-application-accessibilityExtensionContext.md)
- Device Management
- [@ohos.batteryInfo ](js-apis-battery-info.md)
- [@ohos.batteryStatistics](js-apis-batteryStatistics.md)
- [@ohos.brightness](js-apis-brightness.md)
- [@ohos.deviceInfo](js-apis-device-info.md)
- [@ohos.distributedHardware.deviceManager](js-apis-device-manager.md)
- [@ohos.geoLocationManager](js-apis-geoLocationManager.md)
- [@ohos.multimodalInput.inputConsumer](js-apis-inputconsumer.md)
- [@ohos.multimodalInput.inputDevice](js-apis-inputdevice.md)
- [@ohos.multimodalInput.inputDeviceCooperate](js-apis-cooperate.md)
- [@ohos.multimodalInput.inputEvent](js-apis-inputevent.md)
- [@ohos.multimodalInput.inputEventClient](js-apis-inputeventclient.md)
- [@ohos.multimodalInput.inputMonitor](js-apis-inputmonitor.md)
- [@ohos.multimodalInput.keyCode](js-apis-keycode.md)
- [@ohos.multimodalInput.keyEvent](js-apis-keyevent.md)
- [@ohos.multimodalInput.mouseEvent](js-apis-mouseevent.md)
- [@ohos.multimodalInput.pointer](js-apis-pointer.md)
- [@ohos.multimodalInput.touchEvent](js-apis-touchevent.md)
- [@ohos.power](js-apis-power.md)
- [@ohos.runningLock](js-apis-runninglock.md)
- [@ohos.sensor](js-apis-sensor.md)
- [@ohos.settings](js-apis-settings.md)
- [@ohos.stationary](js-apis-stationary.md)
- [@ohos.batteryInfo (Battery Information)](js-apis-battery-info.md)
- [@ohos.batteryStatistics (Battery Statistics)](js-apis-batteryStatistics.md)
- [@ohos.brightness (Screen Brightness)](js-apis-brightness.md)
- [@ohos.deviceInfo (Device Information)](js-apis-device-info.md)
- [@ohos.distributedHardware.deviceManager (Device Management)](js-apis-device-manager.md)
- [@ohos.geoLocationManager (Geolocation Manager)](js-apis-geoLocationManager.md)
- [@ohos.multimodalInput.inputConsumer (Input Consumer)](js-apis-inputconsumer.md)
- [@ohos.multimodalInput.inputDevice (Input Device)](js-apis-inputdevice.md)
- [@ohos.multimodalInput.inputDeviceCooperate (Screen Hopping)](js-apis-cooperate.md)
- [@ohos.multimodalInput.inputEvent (Input Event)](js-apis-inputevent.md)
- [@ohos.multimodalInput.inputEventClient (Key Event Injection)](js-apis-inputeventclient.md)
- [@ohos.multimodalInput.inputMonitor (Input Monitor)](js-apis-inputmonitor.md)
- [@ohos.multimodalInput.keyCode (Key Code)](js-apis-keycode.md)
- [@ohos.multimodalInput.keyEvent (Key Event)](js-apis-keyevent.md)
- [@ohos.multimodalInput.mouseEvent (Mouse Event)](js-apis-mouseevent.md)
- [@ohos.multimodalInput.pointer (Mouse Pointer)](js-apis-pointer.md)
- [@ohos.multimodalInput.touchEvent (Touch Event)](js-apis-touchevent.md)
- [@ohos.power (System Power Management)](js-apis-power.md)
- [@ohos.runningLock (Runninglock)](js-apis-runninglock.md)
- [@ohos.sensor (Sensor)](js-apis-sensor.md)
- [@ohos.settings (Data Item Settings)](js-apis-settings.md)
- [@ohos.stationary (Device Status Awareness Framework)](js-apis-stationary.md)
- [@ohos.systemCapability (SystemCapability)](js-apis-system-capability.md)
- [@ohos.systemParameterV9](js-apis-system-parameterV9.md)
- [@ohos.thermal](js-apis-thermal.md)
- [@ohos.update](js-apis-update.md)
- [@ohos.usb](js-apis-usb.md)
- [@ohos.vibrator](js-apis-vibrator.md)
- [@ohos.systemParameterV9 (System Parameter)](js-apis-system-parameterV9.md)
- [@ohos.thermal (Thermal Management)](js-apis-thermal.md)
- [@ohos.update (Update)](js-apis-update.md)
- [@ohos.usbV9 (USB Management)](js-apis-usb.md)
- [@ohos.vibrator (Vibrator)](js-apis-vibrator.md)
- Account Management
- [@ohos.account.appAccount](js-apis-appAccount.md)
- [@ohos.account.distributedAccount](js-apis-distributed-account.md)
- [@ohos.account.osAccount](js-apis-osAccount.md)
- [@ohos.account.appAccount (App Account Management)](js-apis-appAccount.md)
- [@ohos.account.distributedAccount (Distributed Account Management)](js-apis-distributed-account.md)
- [@ohos.account.osAccount (OS Account Management)](js-apis-osAccount.md)
- Custom Management
- [@ohos.configPolicy](js-apis-configPolicy.md)
- [@ohos.enterpriseAdminExtensionAbility](js-apis-EnterpriseAdminExtensionAbility.md)
- [@ohos.enterprise.adminManager](js-apis-enterprise-adminManager.md)
- [@ohos.enterprise.dateTimeManager](js-apis-enterprise-dateTimeManager.md)
- [@ohos.configPolicy (Configuration Policy)](js-apis-configPolicy.md)
- [@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)](js-apis-EnterpriseAdminExtensionAbility.md)
- [@ohos.enterprise.adminManager (Enterprise Device Management)](js-apis-enterprise-adminManager.md)
- [@ohos.enterprise.dateTimeManager (System Time Management)](js-apis-enterprise-dateTimeManager.md)
- Language Base Class Library
- [@ohos.buffer (Buffer)](js-apis-buffer.md)
- [@ohos.convertxml](js-apis-convertxml.md)
- [@ohos.process](js-apis-process.md)
- [@ohos.uri](js-apis-uri.md)
- [@ohos.url](js-apis-url.md)
- [@ohos.util](js-apis-util.md)
- [@ohos.util.ArrayList](js-apis-arraylist.md)
- [@ohos.util.Deque](js-apis-deque.md)
- [@ohos.util.HashMap](js-apis-hashmap.md)
- [@ohos.util.HashSet](js-apis-hashset.md)
- [@ohos.util.LightWeightMap](js-apis-lightweightmap.md)
- [@ohos.util.LightWeightSet](js-apis-lightweightset.md)
- [@ohos.util.LinkedList](js-apis-linkedlist.md)
- [@ohos.util.List](js-apis-list.md)
- [@ohos.util.PlainArray](js-apis-plainarray.md)
- [@ohos.util.Queue](js-apis-queue.md)
- [@ohos.util.Stack](js-apis-stack.md)
- [@ohos.util.TreeMap](js-apis-treemap.md)
- [@ohos.util.TreeSet](js-apis-treeset.md)
- [@ohos.util.Vector](js-apis-vector.md)
- [@ohos.worker](js-apis-worker.md)
- [@ohos.xml](js-apis-xml.md)
- [@ohos.convertxml (XML-to-JavaScript Conversion)](js-apis-convertxml.md)
- [@ohos.process (Obtaining Process Information)](js-apis-process.md)
- [@ohos.taskpool (Using the Task Pool)](js-apis-taskpool.md)
- [@ohos.uri (URI String Parsing)](js-apis-uri.md)
- [@ohos.url (URL String Parsing)](js-apis-url.md)
- [@ohos.util (util)](js-apis-util.md)
- [@ohos.util.ArrayList (Linear Container ArrayList)](js-apis-arraylist.md)
- [@ohos.util.Deque (Linear Container Deque)](js-apis-deque.md)
- [@ohos.util.HashMap (Nonlinear Container HashMap)](js-apis-hashmap.md)
- [@ohos.util.HashSet (Nonlinear Container HashSet)](js-apis-hashset.md)
- [@ohos.util.LightWeightMap (Nonlinear Container LightWeightMap)](js-apis-lightweightmap.md)
- [@ohos.util.LightWeightSet (Nonlinear Container LightWeightSet)](js-apis-lightweightset.md)
- [@ohos.util.LinkedList (Linear Container LinkedList)](js-apis-linkedlist.md)
- [@ohos.util.List (Linear Container List)](js-apis-list.md)
- [@ohos.util.PlainArray (Nonlinear Container PlainArray)](js-apis-plainarray.md)
- [@ohos.util.Queue (Linear Container Queue)](js-apis-queue.md)
- [@ohos.util.Stack (Linear Container Stack)](js-apis-stack.md)
- [@ohos.util.TreeMap (Nonlinear Container TreeMap)](js-apis-treemap.md)
- [@ohos.util.TreeSet (Nonlinear Container TreeSet)](js-apis-treeset.md)
- [@ohos.util.Vector (Linear Container Vector)](js-apis-vector.md)
- [@ohos.worker (Worker Startup)](js-apis-worker.md)
- [@ohos.xml (XML Parsing and Generation)](js-apis-xml.md)
- Test
- [@ohos.application.testRunner](js-apis-application-testRunner.md)
- [@ohos.uitest](js-apis-uitest.md)
- [@ohos.application.testRunner (TestRunner)](js-apis-application-testRunner.md)
- [@ohos.uitest (UiTest)](js-apis-uitest.md)
- APIs No Longer Maintained
- [@ohos.backgroundTaskManager](js-apis-backgroundTaskManager.md)
- [@ohos.bundle](js-apis-Bundle.md)
- [@ohos.bundle.innerBundleManager](js-apis-Bundle-InnerBundleManager.md)
- [@ohos.bundleState](js-apis-deviceUsageStatistics.md)
- [@ohos.bytrace](js-apis-bytrace.md)
- [@ohos.data.distributedData](js-apis-distributed-data.md)
- [@ohos.data.storage](js-apis-data-storage.md)
- [@ohos.backgroundTaskManager (Background Task Management)](js-apis-backgroundTaskManager.md)
- [@ohos.bundle (Bundle)](js-apis-Bundle.md)
- [@ohos.bundle.innerBundleManager (innerBundleManager)](js-apis-Bundle-InnerBundleManager.md)
- [@ohos.bundleState (Device Usage Statistics)](js-apis-deviceUsageStatistics.md)
- [@ohos.bytrace (Performance Tracing)](js-apis-bytrace.md)
- [@ohos.data.distributedData (Distributed Data Management)](js-apis-distributed-data.md)
- [@ohos.data.storage (Lightweight Data Storage)](js-apis-data-storage.md)
- [@ohos.data.rdb (RDB)](js-apis-data-rdb.md)
- [@ohos.distributedBundle](js-apis-Bundle-distributedBundle.md)
- [@ohos.document](js-apis-document.md)
- [@ohos.geolocation](js-apis-geolocation.md)
- [@ohos.hiAppEvent](js-apis-hiappevent.md)
- [@ohos.prompt](js-apis-prompt.md)
- [@ohos.reminderAgent](js-apis-reminderAgent.md)
- [@ohos.systemParameter](js-apis-system-parameter.md)
- [@ohos.usb](js-apis-usb-deprecated.md)
- [@ohos.workScheduler](js-apis-workScheduler.md)
- [@system.app](js-apis-system-app.md)
- [@system.battery](js-apis-system-battery.md)
- [@system.bluetooth](js-apis-system-bluetooth.md)
- [@system.brightness](js-apis-system-brightness.md)
- [@system.configuration](js-apis-system-configuration.md)
- [@system.device](js-apis-system-device.md)
- [@system.fetch](js-apis-system-fetch.md)
- [@system.file](js-apis-system-file.md)
- [@system.geolocation](js-apis-system-location.md)
- [@system.mediaquery](js-apis-system-mediaquery.md)
- [@system.network](js-apis-system-network.md)
- [@system.notification](js-apis-system-notification.md)
- [@system.package](js-apis-system-package.md)
- [@system.prompt](js-apis-system-prompt.md)
- [@system.request](js-apis-system-request.md)
- [@system.router](js-apis-system-router.md)
- [@system.sensor](js-apis-system-sensor.md)
- [@system.storage](js-apis-system-storage.md)
- [@system.vibrator](js-apis-system-vibrate.md)
- [@ohos.distributedBundle (Distributed Bundle Management)](js-apis-Bundle-distributedBundle.md)
- [@ohos.document (File Operation)](js-apis-document.md)
- [@ohos.fileio (File Management)](js-apis-fileio.md)
- [@ohos.geolocation (Geolocation)](js-apis-geolocation.md)
- [@ohos.hiAppEvent (Application Event Logging)](js-apis-hiappevent.md)
- [@ohos.prompt (Prompt)](js-apis-prompt.md)
- [@ohos.reminderAgent (Reminder Agent)](js-apis-reminderAgent.md)
- [@ohos.statfs (statfs)](js-apis-statfs.md)
- [@ohos.systemParameter (System Parameter)](js-apis-system-parameter.md)
- [@ohos.usb (USB Management)](js-apis-usb-deprecated.md)
- [@system.app (Application Context)](js-apis-system-app.md)
- [@system.battery (Battery Information)](js-apis-system-battery.md)
- [@system.bluetooth (Bluetooth)](js-apis-system-bluetooth.md)
- [@system.brightness (Screen Brightness)](js-apis-system-brightness.md)
- [@system.configuration (Application Configuration)](js-apis-system-configuration.md)
- [@system.device (Device Information)](js-apis-system-device.md)
- [@system.fetch (Data Request)](js-apis-system-fetch.md)
- [@system.file (File Storage)](js-apis-system-file.md)
- [@system.geolocation (Geographic Location)](js-apis-system-location.md)
- [@system.mediaquery (Media Query)](js-apis-system-mediaquery.md)
- [@system.network (Network State)](js-apis-system-network.md)
- [@system.notification (Notification)](js-apis-system-notification.md)
- [@system.package (Bundle Management)](js-apis-system-package.md)
- [@system.prompt (Prompt)](js-apis-system-prompt.md)
- [@system.request (Upload and Download)](js-apis-system-request.md)
- [@system.router (Page Routing)](js-apis-system-router.md)
- [@system.sensor (Sensor)](js-apis-system-sensor.md)
- [@system.storage (Data Storage)](js-apis-system-storage.md)
- [@system.vibrator (Vibrator)](js-apis-system-vibrate.md)
- bundle
- [abilityInfo](js-apis-bundle-AbilityInfo.md)
- [applicationInfo](js-apis-bundle-ApplicationInfo.md)
......
# @ohos.application.AccessibilityExtensionAbility
# @ohos.application.AccessibilityExtensionAbility (AccessibilityExtensionAbility)
The **AccessibilityExtensionAbility** module provides accessibility extension capabilities based on the ExtensionAbility framework.
......
......@@ -2771,6 +2771,7 @@ try {
### bundleManager.getApplicationInfoSync
getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: number) : [ApplicationInfo](js-apis-bundleManager-applicationInfo.md);
getApplicationInfoSync(bundleName: string, applicationFlags: number) : [ApplicationInfo](js-apis-bundleManager-applicationInfo.md);
Synchronously obtains the application information based on the given bundle name, application flags, and user ID.
......@@ -2786,7 +2787,7 @@ Synchronously obtains the application information based on the given bundle name
| ----------- | ------ | ---- | ----------------------------------------------------------|
| bundleName | string | Yes | Bundle name. |
| applicationFlags | [number](#applicationflag) | Yes | Type of the application information to obtain. |
| userId | number | No | User ID. |
| userId | number | Yes | User ID. |
**Return value**
......@@ -2838,6 +2839,7 @@ try {
### bundleManager.getBundleInfoSync
getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag), userId: number): [BundleInfo](js-apis-bundleManager-bundleInfo.md);
getBundleInfoSync(bundleName: string, bundleFlags: [number](#bundleflag)): [BundleInfo](js-apis-bundleManager-bundleInfo.md);
Synchronously obtains the bundle information based on the given bundle name, bundle flags, and user ID.
......
# @ohos.util.Deque (Linear Container Deque)
> **NOTE**
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Double-ended queue (deque) is a sequence container implemented based on the queue data structure that follows the principles of First In First Out (FIFO) and Last In First Out (LIFO). It allows insertion and removal of elements at both the ends. **Deque** can dynamically adjust the capacity based on project requirements. It doubles the capacity each time. **Deque** differs from **[Queue](js-apis-queue.md)** and **[Vector](js-apis-vector.md)** mainly in the following aspects:
......
# @ohos.bundle.distributedBundleManager (distributedBundleManager)
The **distributedBundle** module provides APIs for managing distributed bundles.
> **NOTE**
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The APIs provided by this module are system APIs.
## Modules to Import
```
import distributedBundle from '@ohos.bundle.distributedBundleManager';
```
## System Capabilities
SystemCapability.BundleManager.DistributedBundleFramework
## Required Permissions
| Permission | Permission Level | Description |
| ------------------------------------------ | ------------ | ------------------ |
| ohos.permission.GET_BUNDLE_INFO_PRIVILEGED | system_basic | Permission to query information about all bundles.|
For details, see [Permission Levels](../../security/accesstoken-overview.md#permission-levels).
## distributedBundle.getRemoteAbilityInfo
getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback\<RemoteAbilityInfo>): void;
Obtains information about the remote ability that matches the given element name. This API uses an asynchronous callback to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
**System capability**: SystemCapability.BundleManager.DistributedBundleFramework
**Parameters**
| Name | Type | Mandatory| Description |
| ----------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| elementName | [ElementName](js-apis-bundleManager-elementName.md) | Yes | Target element name. |
| callback | AsyncCallback<[RemoteAbilityInfo](js-apis-bundleManager-remoteAbilityInfo.md)> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is the **RemoteAbilityInfo** object obtained. Otherwise, **err** is an error object and **data** is **undefined**.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
|----------|--------------------------------------|
| 17700001 | The specified bundle name is not found. |
| 17700003 | The specified ability name is not found. |
| 17700007 | The specified device ID is not found. |
| 17700027 | The distributed service is not running. |
**Example**
```ts
try {
distributedBundle.getRemoteAbilityInfo(
{
deviceId: '1',
bundleName: 'com.example.application',
abilityName: 'MainAbility'
}, (err, data) => {
if (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
} else {
console.info('Operation succeed:' + JSON.stringify(data));
}
});
} catch (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
}
```
## distributedBundle.getRemoteAbilityInfo
getRemoteAbilityInfo(elementName: ElementName): Promise\<RemoteAbilityInfo>;
Obtains information about the remote ability that matches the given element name. This API uses a promise to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
**System capability**: SystemCapability.BundleManager.DistributedBundleFramework
**Parameters**
| Name | Type | Mandatory| Description |
| ----------- | -------------------------------------------- | ---- | ----------------------- |
| elementName | [ElementName](js-apis-bundleManager-elementName.md) | Yes | Target element name.|
**Return value**
| Type | Description |
| ------------------------------------------------------------ | --------------------------------- |
| Promise\<[RemoteAbilityInfo](js-apis-bundleManager-remoteAbilityInfo.md)> | Promise used to return the result. If the operation is successful, the **RemoteAbilityInfo** object is returned. Otherwise, an error object is returned.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
|----------|-------------------------|
| 17700001 | The specified bundle name is not found. |
| 17700003 | The specified ability name is not found. |
| 17700007 | The specified device ID is not found. |
| 17700027 | The distributed service is not running. |
**Example**
```ts
try {
distributedBundle.getRemoteAbilityInfo(
{
deviceId: '1',
bundleName: 'com.example.application',
abilityName: 'MainAbility'
}).then(data => {
console.info('Operation succeed:' + JSON.stringify(data));
}).catch(err => {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
});
} catch (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
}
```
## distributedBundle.getRemoteAbilityInfo
getRemoteAbilityInfo(elementNames: Array\<ElementName>, callback: AsyncCallback\<Array\<RemoteAbilityInfo>>): void;
Obtains information about the remote abilities that match the given element names. This API uses an asynchronous callback to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
**System capability**: SystemCapability.BundleManager.DistributedBundleFramework
**Parameters**
| Name | Type | Mandatory| Description |
| ------------ | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| elementNames | Array<[ElementName](js-apis-bundleManager-elementName.md)> | Yes | **ElementName** array, whose maximum length is 10. |
| callback | AsyncCallback\<Array\<[RemoteAbilityInfo](js-apis-bundleManager-remoteAbilityInfo.md)>> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is the array of **RemoteAbilityInfo** objects obtained. Otherwise, **err** is an error object and **data** is **undefined**.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
|----------|-------------------------|
| 17700001 | The specified bundle name is not found. |
| 17700003 | The specified ability name is not found. |
| 17700007 | The specified device ID is not found. |
| 17700027 | The distributed service is not running. |
**Example**
```ts
try {
distributedBundle.getRemoteAbilityInfo(
[
{
deviceId: '1',
bundleName: 'com.example.application1',
abilityName: 'MainAbility1'
},
{
deviceId: '1',
bundleName: 'com.example.application2',
abilityName: 'MainAbility'
}
], (err, data) => {
if (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
} else {
console.info('Operation succeed:' + JSON.stringify(data));
}
});
} catch (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
}
```
## distributedBundle.getRemoteAbilityInfo
getRemoteAbilityInfo(elementNames: Array\<ElementName>): Promise\<Array\<RemoteAbilityInfo>>;
Obtains information about the remote abilities that match the given element names. This API uses a promise to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
**System capability**: SystemCapability.BundleManager.DistributedBundleFramework
**Parameters**
| Name | Type | Mandatory| Description |
| ------------ | --------------------------------------------------- | ---- | ----------------------- |
| elementNames | Array<[ElementName](js-apis-bundleManager-elementName.md)> | Yes | **ElementName** array, whose maximum length is 10.|
**Return value**
| Type | Description |
| ------------------------------------------------------------ | --------------------------------- |
| Promise\<Array<[RemoteAbilityInfo](js-apis-bundleManager-remoteAbilityInfo.md)>> | Promise used to return the result. If the operation is successful, an array of **RemoteAbilityInfo** objects is returned. Otherwise, an error object is returned.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
|----------|-------------------------|
| 17700001 | The specified bundle name is not found. |
| 17700003 | The specified ability name is not found. |
| 17700007 | The specified device ID is not found. |
| 17700027 | The distributed service is not running. |
**Example**
```ts
try {
distributedBundle.getRemoteAbilityInfo(
[
{
deviceId: '1',
bundleName: 'com.example.application',
abilityName: 'MainAbility'
},
{
deviceId: '1',
bundleName: 'com.example.application2',
abilityName: 'MainAbility'
}
]).then(data => {
console.info('Operation succeed:' + JSON.stringify(data));
}).catch(err => {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
});
} catch (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
}
```
## distributedBundle.getRemoteAbilityInfo
getRemoteAbilityInfo(elementName: ElementName, locale: string, callback: AsyncCallback\<RemoteAbilityInfo>): void;
Obtains information about the remote ability that matches the given element name and locale. This API uses an asynchronous callback to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
**System capability**: SystemCapability.BundleManager.DistributedBundleFramework
**Parameters**
| Name | Type | Mandatory| Description |
| ----------- | ------------------------------------------------------------ | ---- | -------------------------------------------------- |
| elementName | [ElementName](js-apis-bundleManager-elementName.md) | Yes | Target element name. |
| locale | string |Yes| Target locale.|
| callback | AsyncCallback<[RemoteAbilityInfo](js-apis-bundleManager-remoteAbilityInfo.md)> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is the **RemoteAbilityInfo** object obtained. Otherwise, **err** is an error object and **data** is **undefined**.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
|----------|-------------------------|
| 17700001 | The specified bundle name is not found. |
| 17700003 | The specified ability name is not found. |
| 17700007 | The specified device ID is not found. |
| 17700027 | The distributed service is not running. |
**Example**
```ts
try {
distributedBundle.getRemoteAbilityInfo(
{
deviceId: '1',
bundleName: 'com.example.application',
abilityName: 'MainAbility'
}, 'zh-Hans-CN', (err, data) => {
if (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
} else {
console.info('Operation succeed:' + JSON.stringify(data));
}
});
} catch (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
}
```
## distributedBundle.getRemoteAbilityInfo
getRemoteAbilityInfo(elementName: ElementName, locale: string): Promise\<RemoteAbilityInfo>;
Obtains information about the remote ability that matches the given element name and locale. This API uses a promise to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
**System capability**: SystemCapability.BundleManager.DistributedBundleFramework
**Parameters**
| Name | Type | Mandatory| Description |
| ----------- | -------------------------------------------- | ---- | ----------------------- |
| elementName | [ElementName](js-apis-bundleManager-elementName.md) | Yes | Target element name.|
| locale | string |Yes| Target locale.|
**Return value**
| Type | Description |
| ------------------------------------------------------------ | --------------------------------- |
| Promise\<[RemoteAbilityInfo](js-apis-bundleManager-remoteAbilityInfo.md)> | Promise used to return the result. If the operation is successful, the **RemoteAbilityInfo** object is returned. Otherwise, an error object is returned.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
|----------|-------------------------|
| 17700001 | The specified bundle name is not found. |
| 17700003 | The specified ability name is not found. |
| 17700007 | The specified device ID is not found. |
| 17700027 | The distributed service is not running. |
**Example**
```ts
try {
distributedBundle.getRemoteAbilityInfo(
{
deviceId: '1',
bundleName: 'com.example.application',
abilityName: 'MainAbility'
}, 'zh-Hans-CN').then(data => {
console.info('Operation succeed:' + JSON.stringify(data));
}).catch(err => {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
});
} catch (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
}
```
## distributedBundle.getRemoteAbilityInfo
getRemoteAbilityInfo(elementNames: Array\<ElementName>, locale: string, callback: AsyncCallback\<Array\<RemoteAbilityInfo>>): void;
Obtains information about the remote abilities that match the given element names and locale. This API uses an asynchronous callback to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
**System capability**: SystemCapability.BundleManager.DistributedBundleFramework
**Parameters**
| Name | Type | Mandatory| Description |
| ------------ | ------------------------------------------------------------ | ---- | -------------------------------------------------- |
| elementNames | Array<[ElementName](js-apis-bundleManager-elementName.md)> | Yes | **ElementName** array, whose maximum length is 10. |
| locale | string |Yes| Target locale.|
| callback | AsyncCallback\<Array\<[RemoteAbilityInfo](js-apis-bundleManager-remoteAbilityInfo.md)>> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is the array of **RemoteAbilityInfo** objects obtained. Otherwise, **err** is an error object and **data** is **undefined**.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID | Error Message |
|---------------|-------------------------|
| 17700001 | The specified bundle name is not found. |
| 17700003 | The specified ability name is not found. |
| 17700007 | The specified device ID is not found. |
| 17700027 | The distributed service is not running. |
**Example**
```ts
try {
distributedBundle.getRemoteAbilityInfo(
[
{
deviceId: '1',
bundleName: 'com.example.application1',
abilityName: 'MainAbility1'
},
{
deviceId: '1',
bundleName: 'com.example.application2',
abilityName: 'MainAbility'
}
], 'zh-Hans-CN', (err, data) => {
if (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
} else {
console.info('Operation succeed:' + JSON.stringify(data));
}
});
} catch (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
}
```
## distributedBundle.getRemoteAbilityInfo
getRemoteAbilityInfo(elementNames: Array\<ElementName>, locale: string): Promise\<Array\<RemoteAbilityInfo>>;
Obtains information about the remote abilities that match the given element names and locale. This API uses a promise to return the result.
**System API**: This is a system API.
**Required permissions**: ohos.permission.GET_BUNDLE_INFO_PRIVILEGED
**System capability**: SystemCapability.BundleManager.DistributedBundleFramework
**Parameters**
| Name | Type | Mandatory| Description |
| ------------ | --------------------------------------------------- | ---- | ----------------------- |
| elementNames | Array<[ElementName](js-apis-bundleManager-elementName.md)> | Yes | **ElementName** array, whose maximum length is 10.|
| locale | string |Yes| Target locale.|
**Return value**
| Type | Description |
| ------------------------------------------------------------ | --------------------------------- |
| Promise\<Array<[RemoteAbilityInfo](js-apis-bundleManager-remoteAbilityInfo.md)>> | Promise used to return the result. If the operation is successful, an array of **RemoteAbilityInfo** objects is returned. Otherwise, an error object is returned.|
**Error codes**
For details about the error codes, see [Bundle Error Codes](../errorcodes/errorcode-bundle.md).
| ID| Error Message |
|----------|-------------------------|
| 17700001 | The specified bundle name is not found. |
| 17700003 | The specified ability name is not found. |
| 17700007 | The specified device ID is not found. |
| 17700027 | The distributed service is not running. |
**Example**
```ts
try {
distributedBundle.getRemoteAbilityInfo(
[
{
deviceId: '1',
bundleName: 'com.example.application',
abilityName: 'MainAbility'
},
{
deviceId: '1',
bundleName: 'com.example.application2',
abilityName: 'MainAbility'
}
], 'zh-Hans-CN').then(data => {
console.info('Operation succeed:' + JSON.stringify(data));
}).catch(err => {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
});
} catch (err) {
console.error('Operation failed: error code is ' + err.code + 'and error message is ' + err.message);
}
```
# File Interaction
# @ohos.document (File Interaction)
> **NOTE**<br/>
> - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......
# @ohos.data.fileAccess
# @ohos.file.fileAccess (User File Access and Management)
The **fileAccess** module is a framework for accessing and operating user files based on the Extension ability mechanism. This module interacts with diverse file management services, such as the media library and external storage management service, and provides a set of file access and management APIs for system applications. The media library service allows access to user files on local devices and distributed devices. The external storage management service allows access to the user files stored on devices such as shared disks, USB flash drives, and SD cards.
......
# @ohos.fileExtensionInfo
# @ohos.file.fileExtensionInfo (User File Extension Information)
The **fileExtensionInfo** module defines attributes in **RootInfo** and **FileInfo** of the user file access and management module.
......
# File Management
# @ohos.fileio (File Management)
The **fileio** module provides APIs for file storage and management, including basic file management, directory management, file information statistics, and stream read and write.
......@@ -40,7 +40,7 @@ FA Model
let pathDir = data;
})
```
For details about how to obtain the context of the FA model, see [FA Model](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-Context.md#context).
## fileio.stat
......
# @ohos.bundle.launcherBundleManager
# @ohos.bundle.launcherBundleManager (launcherBundleManager)
The **bundle.launcherBundleManager** module providers APIs for the **Home Screen** application to obtain the launcher ability information and shortcut information.
......
# @ohos.reminderAgent (reminderAgent)
# @ohos.reminderAgent (Reminder Agent)
The **reminderAgent** module provides APIs for publishing scheduled reminders through the reminder agent.
......
# @ohos.reminderAgentManager (reminderAgentManager)
# @ohos.reminderAgentManager (Reminder Agent Management)
The **reminderAgentManager** module provides APIs for publishing scheduled reminders through the reminder agent.
......
# @ohos.resourceschedule.workScheduler (workScheduler)
# @ohos.resourceschedule.workScheduler (Work Scheduler)
The **workScheduler** module provides the APIs for registering, canceling, and querying Work Scheduler tasks, which do not have real-time constraints.
......
# @ohos.screenshot
# @ohos.screenshot (Screenshot)
The **Screenshot** module provides APIs for you to set information such as the region to capture and the size of the screen region when capturing a screen.
......
# statfs
# @ohos.statfs (statfs)
The statfs module provides APIs for obtaining file system information, including the total number of bytes and the number of idle bytes of the file system.
......
# Bluetooth
# @system.bluetooth (Bluetooth)
> **NOTE**<br/>
......
# Application Configuration
# @system.configuration (Application Configuration)
> **NOTE**<br>
> - The APIs of this module are no longer maintained since API version 7. You are advised to use [`@ohos.i18n`](js-apis-i18n.md) and [`@ohos.intl`](js-apis-intl.md) instead.
......
# Data Request
# @system.fetch (Data Request)
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br/>
> **NOTE**
>
> - The APIs of this module are no longer maintained since API version 6. You are advised to use [`@ohos.net.http`](js-apis-http.md) instead.
>
>
> - The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......
# File Storage
# @system.file (File Storage)
> **NOTE**<br>
> - The APIs of this module are no longer maintained since API version 6. You are advised to use [`@ohos.fileio`](js-apis-fileio.md).
......
# Geographic Location
# @system.geolocation (Geographic Location)
> **NOTE**
>
> - The APIs of this module are no longer maintained since API version 7. You are advised to use [`@ohos.geolocation`](js-apis-geolocation.md).
> - The initial APIs of this module are supported since API version 3. Newly added APIs will be marked with a superscript to indicate their earliest API version.
......
# Data Storage
# @system.storage (Data Storage)
> **NOTE**<br/>
>
......
# @ohos.taskpool (Using the Task Pool)
The task pool provides a multi-thread running environment for applications. It helps reduce resource consumption and improve system performance. It also frees you from caring about the lifecycle of thread instances. You can use the **TaskPool** APIs to create background tasks and perform operations on them, for example, executing or canceling a task. Theoretically, you can create an unlimited number of tasks, but this is not recommended for memory considerations. In addition, you are not advised performing blocking operations in a task, especially indefinite blocking. Long-time blocking operations occupy worker threads and may block other task scheduling, adversely affecting your application performance.
You can determine the execution sequence of tasks with the same priority. They are executed in the same sequence as you call the task execution APIs. The default task priority is **MEDIUM**. (The task priority mechanism is not supported yet.)
If the number of tasks to be executed is greater than the number of worker threads in the task pool, the task pool scales out based on load balancing to minimize the waiting duration. Similarly, when the number of tasks to be executed falls below the number of worker threads, the task pool scales in to reduce the number of worker threads. (The load balancing mechanism is not supported yet.)
The **TaskPool** APIs return error codes in numeric format. For details about the error codes, see [Utils Error Codes](../errorcodes/errorcode-utils.md).
> **NOTE**<br>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
```js
import taskpool from '@ohos.taskpool';
```
## Priority
Enumerates the priorities available for created tasks. (This enum is not supported yet.)
**System capability**: SystemCapability.Utils.Lang
| Name| Value| Description|
| -------- | -------- | -------- |
| HIGH | 0 | The task has a high priority.|
| MEDIUM | 1 | The task has a medium priority.|
| LOW | 2 | The task has a low priority.|
## Task
Implements a task. Before using any of the following APIs, you must create a **Task** instance.
### constructor
constructor(func: Function, ...args: unknown[])
A constructor used to create a **Task** instance.
**System capability**: SystemCapability.Utils.Lang
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | --------- | ---- | -------------------------------------------------------------------- |
| func | Function | Yes | Function to be passed in for task execution. For details about the supported return value types of the function, see [Sequenceable Data Types](#sequenceable-data-types). |
| args | unknown[] | No | Arguments of the function. For details about the supported parameter types, see [Sequenceable Data Types](#sequenceable-data-types).|
**Error codes**
For details about the error codes, see [Utils Error Codes](../errorcodes/errorcode-utils.md).
| ID| Error Message |
| -------- | --------------------------------------- |
| 10200014 | The function is not mark as concurrent. |
**Example**
```js
function func(args) {
"use concurrent"
console.log("func: " + args);
return args;
}
let task = new taskpool.Task(func, "this is my first Task");
```
### Attributes
**System capability**: SystemCapability.Utils.Lang
| Name | Type | Readable| Writable| Description |
| --------- | --------- | ---- | ---- | ------------------------------------------------------------------------- |
| function | Function | Yes | Yes | Function to be passed in during task creation. For details about the supported return value types of the function, see [Sequenceable Data Types](#sequenceable-data-types). |
| arguments | unknown[] | Yes | Yes | Arguments of the function. For details about the supported parameter types, see [Sequenceable Data Types](#sequenceable-data-types).|
## taskpool.execute
execute(func: Function, ...args: unknown[]): Promise\<unknown>
Executes a task in the task pool. You must pass in a function and arguments to execute the task, and the task executed in this mode cannot be canceled.
**System capability**: SystemCapability.Utils.Lang
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | --------- | ---- | ---------------------------------------------------------------------- |
| func | Function | Yes | Function used to execute the task. For details about the supported return value types of the function, see [Sequenceable Data Types](#sequenceable-data-types). |
| args | unknown[] | No | Arguments of the function. For details about the supported parameter types, see [Sequenceable Data Types](#sequenceable-data-types).|
**Return value**
| Type | Description |
| ----------------- | ------------------------------------ |
| Promise\<unknown> | Promise used to return the result.|
**Error codes**
For details about the error codes, see [Utils Error Codes](../errorcodes/errorcode-utils.md).
| ID| Error Message |
| -------- | ----------------------------------------- |
| 10200003 | Worker initialization failure. |
| 10200006 | Serializing an uncaught exception failed. |
| 10200014 | The function is not mark as concurrent. |
**Example**
```js
function func(args) {
"use concurrent"
console.log("func: " + args);
return args;
}
let value = taskpool.execute(func, 100);
```
## taskpool.execute
execute(task: Task, priority?: Priority): Promise\<unknown>
Executes a task in the task pool. You must pass in a created task, and the task executed in this mode can be canceled.
**System capability**: SystemCapability.Utils.Lang
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | --------------------- | ---- | ------------------------------------ |
| task | [Task](#task) | Yes | Task to be executed. |
| priority | [Priority](#priority) | No | Priority of the task (not supported yet).|
**Return value**
| Type | Description |
| ---------------- | ------------------------------ |
| Promise\<unknown> | Promise used to return the result.|
**Error codes**
For details about the error codes, see [Utils Error Codes](../errorcodes/errorcode-utils.md).
| ID| Error Message |
| -------- | ----------------------------------------- |
| 10200003 | Worker initialization failure. |
| 10200006 | Serializing an uncaught exception failed. |
| 10200014 | The function is not mark as concurrent. |
**Example**
```js
function func(args) {
"use concurrent"
console.log("func: " + args);
return args;
}
let task = new taskpool.Task(func, "this is my first Task");
let value = taskpool.execute(task);
```
## taskpool.cancel
cancel(task: Task): void
Cancels a task in the task pool.
**System capability**: SystemCapability.Utils.Lang
**Parameters**
| Name| Type | Mandatory| Description |
| ------ | ------------- | ---- | -------------------- |
| task | [Task](#task) | Yes | Task to cancel.|
**Error codes**
For details about the error codes, see [Utils Error Codes](../errorcodes/errorcode-utils.md).
| ID| Error Message |
| -------- | ------------------------- |
| 10200015 | If the task is not exist. |
| 10200016 | If the task is running. |
**Example**
```js
function func(args) {
"use concurrent"
console.log("func: " + args);
return args;
}
let task = new taskpool.Task(func, "this is first Task");
let value = taskpool.execute(task);
taskpool.cancel(task);
```
## Additional Information
### Sequenceable Data Types
The following sequenceable data types are supported: All Primitive Type (excluding symbol), Date, String, RegExp, Array, Map, Set, Object, ArrayBuffer, and TypedArray.
### Precautions
A task in the task pool can reference only variables passed in by input parameters or imported variables. It does not support closure variables.
```js
// 1. Reference a variable passed in by the input parameter.
function func(args) {
"use concurrent"
console.log("func: " + args);
return args;
}
let task = new taskpool.Task(func, "create task, then execute");
let val1 = taskpool.execute(task);
let val2 = taskpool.execute(func, "execute task by func");
```
```js
// 2. Reference an imported variable.
// b.ts
export var c = 2000;
// a.ts
import { c } from './b'
function test(a) {
"use concurrent"
console.log(a);
console.log(c);
return a;
}
let task = new taskpool.Task(test, "create task, then execute");
let val1 = taskpool.execute(task);
let val2 = taskpool.execute(test, "execute task by func");
```
# @ohos.wantAgent
# @ohos.wantAgent (wantAgent)
The **WantAgent** module provides APIs for creating and comparing **WantAgent** objects, and obtaining the user ID and bundle name of a **WantAgent** object.
......
# @ohos.window
# @ohos.window (Window)
The **Window** module provides basic window management capabilities, such as creating and destroying the current window, setting properties for the current window, and managing and scheduling windows.
......@@ -54,7 +54,7 @@ Defines the parameters for creating a subwindow or system window.
| ---------- | -------------------------- | -- | ----------------------------------- |
| name | string | Yes| Name of the window. |
| windowType | [WindowType](#windowtype7) | Yes| Type of the window. |
| ctx | BaseContext | No| Current application context.<br>For details about the context in the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the context in the stage model, see [ServiceExtensionContext](js-apis-inner-application-serviceExtensionContext.md). If this parameter is not set, no context is used.<br>A system window is created when **Context** is [ServiceExtensionContext](js-apis-inner-application-serviceExtensionContext.md).|
| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | No| Current application context. If this parameter is not set, no context is used.<br>You do not need to set this parameter to create a subwindow in the FA model or a system window in the stage model. |
| displayId | number | No| ID of the current physical screen. If this parameter is not set, the default value **-1** is used.|
| parentId | number | No| ID of the parent window. If this parameter is not set, the default value **-1** is used. |
......@@ -430,7 +430,7 @@ Obtains the top window of the current application. This API uses an asynchronous
| Name| Type| Mandatory| Description|
| -------- | -------------------------------------- | -- | ---------------------------------------- |
| ctx | BaseContext | Yes| Current application context.<br>For details about the context in the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the context in the stage model, see [Context](js-apis-ability-context.md).|
| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | Yes| Current application context.|
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes| Callback used to return the top window obtained.|
**Error codes**
......@@ -472,7 +472,7 @@ Obtains the top window of the current application. This API uses a promise to re
| Name| Type| Mandatory| Description|
| ------ | ----------- | ---- | ------------------------------------------------------------ |
| ctx | BaseContext | Yes | Current application context.<br>For details about the context in the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the context in the stage model, see [Context](js-apis-ability-context.md).|
| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | Yes | Current application context.|
**Return value**
......@@ -897,7 +897,7 @@ promise.then((data)=> {
create(ctx: BaseContext, id: string, type: WindowType, callback: AsyncCallback&lt;Window&gt;): void
Creates a subwindow (in API version 8) or a system window (from API version 9). This API uses an asynchronous callback to return the result.
Creates a system window. This API uses an asynchronous callback to return the result.
> **NOTE**
>
......@@ -907,12 +907,12 @@ Creates a subwindow (in API version 8) or a system window (from API version 9).
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
| ctx | BaseContext | Yes | Current application context.<br>For details about the context in the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the context in the stage model, see [ServiceExtensionContext](js-apis-inner-application-serviceExtensionContext.md).|
| id | string | Yes | Window ID. |
| type | [WindowType](#windowtype7) | Yes | Window type. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the subwindow created. |
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------- | ---- | ------------------------------------ |
| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | Yes | Current application context. |
| id | string | Yes | Window ID. |
| type | [WindowType](#windowtype7) | Yes | Window type. |
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the subwindow created.|
**Example**
......@@ -933,7 +933,7 @@ window.create(this.context, 'alertWindow', window.WindowType.TYPE_SYSTEM_ALERT,
create(ctx: BaseContext, id: string, type: WindowType): Promise&lt;Window&gt;
Creates a subwindow (in API version 8) or a system window (from API version 9). This API uses a promise to return the result.
Creates a system window. This API uses a promise to return the result.
> **NOTE**
>
......@@ -945,7 +945,7 @@ Creates a subwindow (in API version 8) or a system window (from API version 9).
| Name| Type | Mandatory| Description |
| ------ | ------------------------- | ---- | ------------------------------------------------------------ |
| ctx | BaseContext | Yes | Current application context.<br>For details about the context in the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the context in the stage model, see [ServiceExtensionContext](js-apis-inner-application-serviceExtensionContext.md).|
| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | Yes | Current application context.|
| id | string | Yes | Window ID. |
| type | [WindowType](#windowtype7) | Yes | Window type. |
......@@ -1121,7 +1121,7 @@ Obtains the top window of the current application. This API uses an asynchronous
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ------------------------------------------------------------ |
| ctx | BaseContext | Yes | Current application context.<br>For details about the context in the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the context in the stage model, see [Context](js-apis-ability-context.md).|
| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | Yes | Current application context.|
| callback | AsyncCallback&lt;[Window](#window)&gt; | Yes | Callback used to return the top window obtained. |
**Example**
......@@ -1154,7 +1154,7 @@ Obtains the top window of the current application. This API uses a promise to re
| Name| Type | Mandatory| Description |
| ------ | ----------- | ---- | ------------------------------------------------------------ |
| ctx | BaseContext | Yes | Current application context.<br>For details about the context in the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the context in the stage model, see [Context](js-apis-ability-context.md).|
| ctx | [BaseContext](js-apis-inner-application-baseContext.md) | Yes | Current application context.|
**Return value**
......@@ -1864,7 +1864,7 @@ Obtains the area where this window cannot be displayed, for example, the system
| Name| Type| Mandatory| Description|
| ---- |----------------------------------| -- | ------------------------------------------------------------ |
| type | [AvoidAreaType](#avoidareatype7) | Yes| Type of the area. |
| type | [AvoidAreaType](#avoidareatype7) | Yes| Type of the area.|
**Return value**
......@@ -4084,7 +4084,6 @@ try {
} catch (exception) {
console.error('Failed to set backdrop blur. Cause: ' + JSON.stringify(exception));
}
```
### setBackdropBlurStyle<sup>9+</sup>
......@@ -4120,7 +4119,6 @@ try {
} catch (exception) {
console.error('Failed to set backdrop blur style. Cause: ' + JSON.stringify(exception));
}
```
### setShadow<sup>9+</sup>
......@@ -4159,7 +4157,6 @@ try {
} catch (exception) {
console.error('Failed to set shadow. Cause: ' + JSON.stringify(exception));
}
```
### setCornerRadius<sup>9+</sup>
......@@ -4195,7 +4192,6 @@ try {
} catch (exception) {
console.error('Failed to set corner radius. Cause: ' + JSON.stringify(exception));
}
```
### show<sup>(deprecated)</sup>
......@@ -4226,7 +4222,6 @@ windowClass.show((err) => {
}
console.info('Succeeded in showing the window.');
});
```
### show<sup>(deprecated)</sup>
......@@ -4256,7 +4251,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to show the window. Cause: ' + JSON.stringify(err));
});
```
### destroy<sup>(deprecated)</sup>
......@@ -4287,7 +4281,6 @@ windowClass.destroy((err) => {
}
console.info('Succeeded in destroying the window.');
});
```
### destroy<sup>(deprecated)</sup>
......@@ -4317,7 +4310,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to destroy the window. Cause: ' + JSON.stringify(err));
});
```
### moveTo<sup>(deprecated)</sup>
......@@ -4352,7 +4344,6 @@ windowClass.moveTo(300, 300, (err)=>{
}
console.info('Succeeded in moving the window.');
});
```
### moveTo<sup>(deprecated)</sup>
......@@ -4391,7 +4382,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to move the window. Cause: ' + JSON.stringify(err));
});
```
### resetSize<sup>(deprecated)</sup>
......@@ -4432,7 +4422,6 @@ windowClass.resetSize(500, 1000, (err) => {
}
console.info('Succeeded in changing the window size.');
});
```
### resetSize<sup>(deprecated)</sup>
......@@ -4477,7 +4466,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to change the window size. Cause: ' + JSON.stringify(err));
});
```
### setWindowType<sup>(deprecated)</sup>
......@@ -4512,7 +4500,6 @@ windowClass.setWindowType(type, (err) => {
}
console.info('Succeeded in setting the window type.');
});
```
### setWindowType<sup>(deprecated)</sup>
......@@ -4551,7 +4538,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set the window type. Cause: ' + JSON.stringify(err));
});
```
### getProperties<sup>(deprecated)</sup>
......@@ -4582,7 +4568,6 @@ windowClass.getProperties((err, data) => {
}
console.info('Succeeded in obtaining the window properties. Data: ' + JSON.stringify(data));
});
```
### getProperties<sup>(deprecated)</sup>
......@@ -4612,7 +4597,6 @@ promise.then((data)=> {
}).catch((err)=>{
console.error('Failed to obtain the window properties. Cause: ' + JSON.stringify(err));
});
```
### getAvoidArea<sup>(deprecated)</sup>
......@@ -4629,10 +4613,10 @@ Obtains the area where this window cannot be displayed, for example, the system
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | --------------------------------------------- | --------- | ------------------------------------------------------------ |
| type | [AvoidAreaType](#avoidareatype7) | Yes | Type of the area. |
| callback | AsyncCallback&lt;[AvoidArea](#avoidarea7)&gt; | Yes | Callback used to return the area. |
| Name | Type | Mandatory | Description |
| -------- | --------------------------------------------- | --------- | --------------------------------- |
| type | [AvoidAreaType](#avoidareatype7) | Yes | Type of the area. |
| callback | AsyncCallback&lt;[AvoidArea](#avoidarea7)&gt; | Yes | Callback used to return the area. |
**Example**
......@@ -4645,7 +4629,6 @@ windowClass.getAvoidArea(type, (err, data) => {
}
console.info('Succeeded in obtaining the area. Data:' + JSON.stringify(data));
});
```
### getAvoidArea<sup>(deprecated)</sup>
......@@ -4662,9 +4645,9 @@ Obtains the area where this window cannot be displayed, for example, the system
**Parameters**
| Name | Type | Mandatory | Description |
| ---- | -------------------------------- | --------- | ------------------------------------------------------------ |
| type | [AvoidAreaType](#avoidareatype7) | Yes | Type of the area. |
| Name | Type | Mandatory | Description |
| ---- | -------------------------------- | --------- | ----------------- |
| type | [AvoidAreaType](#avoidareatype7) | Yes | Type of the area. |
**Return value**
......@@ -4682,7 +4665,6 @@ promise.then((data)=> {
}).catch((err)=>{
console.error('Failed to obtain the area. Cause:' + JSON.stringify(err));
});
```
### setFullScreen<sup>(deprecated)</sup>
......@@ -4715,7 +4697,6 @@ windowClass.setFullScreen(isFullScreen, (err) => {
}
console.info('Succeeded in enabling the full-screen mode.');
});
```
### setFullScreen<sup>(deprecated)</sup>
......@@ -4752,7 +4733,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to enable the full-screen mode. Cause: ' + JSON.stringify(err));
});
```
### setLayoutFullScreen<sup>(deprecated)</sup>
......@@ -4785,7 +4765,6 @@ windowClass.setLayoutFullScreen(isLayoutFullScreen, (err) => {
}
console.info('Succeeded in setting the window layout to full-screen mode.');
});
```
### setLayoutFullScreen<sup>(deprecated)</sup>
......@@ -4822,7 +4801,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set the window layout to full-screen mode. Cause:' + JSON.stringify(err));
});
```
### setSystemBarEnable<sup>(deprecated)</sup>
......@@ -4856,7 +4834,6 @@ windowClass.setSystemBarEnable(names, (err) => {
}
console.info('Succeeded in setting the system bar to be invisible.');
});
```
### setSystemBarEnable<sup>(deprecated)</sup>
......@@ -4894,7 +4871,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set the system bar to be invisible. Cause:' + JSON.stringify(err));
});
```
### setSystemBarProperties<sup>(deprecated)</sup>
......@@ -4933,7 +4909,6 @@ windowClass.setSystemBarProperties(SystemBarProperties, (err) => {
}
console.info('Succeeded in setting the system bar properties.');
});
```
### setSystemBarProperties<sup>(deprecated)</sup>
......@@ -4976,7 +4951,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set the system bar properties. Cause: ' + JSON.stringify(err));
});
```
### loadContent<sup>(deprecated)</sup>
......@@ -5008,7 +4982,6 @@ windowClass.loadContent('pages/page2/page2', (err) => {
}
console.info('Succeeded in loading the content.');
});
```
### loadContent<sup>(deprecated)</sup>
......@@ -5044,7 +5017,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to load the content. Cause: ' + JSON.stringify(err));
});
```
### isShowing<sup>(deprecated)</sup>
......@@ -5075,7 +5047,6 @@ windowClass.isShowing((err, data) => {
}
console.info('Succeeded in checking whether the window is showing. Data: ' + JSON.stringify(data));
});
```
### isShowing<sup>(deprecated)</sup>
......@@ -5105,7 +5076,6 @@ promise.then((data)=> {
}).catch((err)=>{
console.error('Failed to check whether the window is showing. Cause: ' + JSON.stringify(err));
});
```
### on('systemAvoidAreaChange')<sup>(deprecated)</sup>
......@@ -5133,7 +5103,6 @@ Enables listening for changes to the area where the window cannot be displayed.
windowClass.on('systemAvoidAreaChange', (data) => {
console.info('Succeeded in enabling the listener for system avoid area changes. Data: ' + JSON.stringify(data));
});
```
### off('systemAvoidAreaChange')<sup>(deprecated)</sup>
......@@ -5159,7 +5128,6 @@ Disables listening for changes to the area where the window cannot be displayed.
```js
windowClass.off('systemAvoidAreaChange');
```
### isSupportWideGamut<sup>(deprecated)</sup>
......@@ -5190,7 +5158,6 @@ windowClass.isSupportWideGamut((err, data) => {
}
console.info('Succeeded in checking whether the window support WideGamut Data: ' + JSON.stringify(data));
});
```
### isSupportWideGamut<sup>(deprecated)</sup>
......@@ -5220,7 +5187,6 @@ promise.then((data)=> {
}).catch((err)=>{
console.error('Failed to check whether the window support WideGamut. Cause: ' + JSON.stringify(err));
});
```
### setColorSpace<sup>(deprecated)</sup>
......@@ -5237,10 +5203,10 @@ Sets a color space for this window. This API uses an asynchronous callback to re
**Parameters**
| Name | Type | Mandatory | Description |
| ---------- | ------------------------- | --------- | ----------------------------------- |
| Name | Type | Mandatory | Description |
| ---------- | -------------------------- | --------- | ----------------------------------- |
| colorSpace | [ColorSpace](#colorspace8) | Yes | Color space to set. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. |
**Example**
......@@ -5252,7 +5218,6 @@ windowClass.setColorSpace(window.ColorSpace.WIDE_GAMUT, (err) => {
}
console.info('Succeeded in setting window colorspace.');
});
```
### setColorSpace<sup>(deprecated)</sup>
......@@ -5269,8 +5234,8 @@ Sets a color space for this window. This API uses a promise to return the result
**Parameters**
| Name | Type | Mandatory | Description |
| ---------- | ------------------------- | --------- | ------------------- |
| Name | Type | Mandatory | Description |
| ---------- | -------------------------- | --------- | ------------------- |
| colorSpace | [ColorSpace](#colorspace8) | Yes | Color space to set. |
**Return value**
......@@ -5288,7 +5253,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set window colorspace. Cause: ' + JSON.stringify(err));
});
```
### getColorSpace<sup>(deprecated)</sup>
......@@ -5305,8 +5269,8 @@ Obtains the color space of this window. This API uses an asynchronous callback t
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ---------------------------------------------- | --------- | ------------------------------------------------------------ |
| Name | Type | Mandatory | Description |
| -------- | ----------------------------------------------- | --------- | ------------------------------------------------------------ |
| callback | AsyncCallback&lt;[ColorSpace](#colorspace8)&gt; | Yes | Callback used to return the result. When the color space is obtained successfully, **err** is **undefined**, and **data** is the current color space. |
**Example**
......@@ -5319,7 +5283,6 @@ windowClass.getColorSpace((err, data) => {
}
console.info('Succeeded in getting window colorspace. Cause:' + JSON.stringify(data));
});
```
### getColorSpace<sup>(deprecated)</sup>
......@@ -5336,8 +5299,8 @@ Obtains the color space of this window. This API uses a promise to return the re
**Return value**
| Type | Description |
| ---------------------------------------- | ----------------------------------------------- |
| Type | Description |
| ----------------------------------------- | ----------------------------------------------- |
| Promise&lt;[ColorSpace](#colorspace8)&gt; | Promise used to return the current color space. |
**Example**
......@@ -5349,7 +5312,6 @@ promise.then((data)=> {
}).catch((err)=>{
console.error('Failed to get window colorspace. Cause: ' + JSON.stringify(err));
});
```
### setBackgroundColor<sup>(deprecated)</sup>
......@@ -5382,7 +5344,6 @@ windowClass.setBackgroundColor(color, (err) => {
}
console.info('Succeeded in setting the background color.');
});
```
### setBackgroundColor<sup>(deprecated)</sup>
......@@ -5419,7 +5380,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set the background color. Cause: ' + JSON.stringify(err));
});
```
### setBrightness<sup>(deprecated)</sup>
......@@ -5452,7 +5412,6 @@ windowClass.setBrightness(brightness, (err) => {
}
console.info('Succeeded in setting the brightness.');
});
```
### setBrightness<sup>(deprecated)</sup>
......@@ -5489,7 +5448,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set the brightness. Cause: ' + JSON.stringify(err));
});
```
### setDimBehind<sup>(deprecated)</sup>
......@@ -5521,7 +5479,6 @@ windowClass.setDimBehind(0.5, (err) => {
}
console.info('Succeeded in setting the dimness.');
});
```
### setDimBehind<sup>(deprecated)</sup>
......@@ -5557,7 +5514,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set the dimness. Cause: ' + JSON.stringify(err));
});
```
### setFocusable<sup>(deprecated)</sup>
......@@ -5590,7 +5546,6 @@ windowClass.setFocusable(isFocusable, (err) => {
}
console.info('Succeeded in setting the window to be focusable.');
});
```
### setFocusable<sup>(deprecated)</sup>
......@@ -5627,7 +5582,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set the window to be focusable. Cause: ' + JSON.stringify(err));
});
```
### setKeepScreenOn<sup>(deprecated)</sup>
......@@ -5660,7 +5614,6 @@ windowClass.setKeepScreenOn(isKeepScreenOn, (err) => {
}
console.info('Succeeded in setting the screen to be always on.');
});
```
### setKeepScreenOn<sup>(deprecated)</sup>
......@@ -5697,7 +5650,6 @@ promise.then(() => {
}).catch((err)=>{
console.info('Failed to set the screen to be always on. Cause: ' + JSON.stringify(err));
});
```
### setOutsideTouchable<sup>(deprecated)</sup>
......@@ -5729,7 +5681,6 @@ windowClass.setOutsideTouchable(true, (err) => {
}
console.info('Succeeded in setting the area to be touchable.');
});
```
### setOutsideTouchable<sup>(deprecated)</sup>
......@@ -5765,7 +5716,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set the area to be touchable. Cause: ' + JSON.stringify(err));
});
```
### setPrivacyMode<sup>(deprecated)</sup>
......@@ -5798,7 +5748,6 @@ windowClass.setPrivacyMode(isPrivacyMode, (err) => {
}
console.info('Succeeded in setting the window to privacy mode.');
});
```
### setPrivacyMode<sup>(deprecated)</sup>
......@@ -5835,7 +5784,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set the window to privacy mode. Cause: ' + JSON.stringify(err));
});
```
### setTouchable<sup>(deprecated)</sup>
......@@ -5868,7 +5816,6 @@ windowClass.setTouchable(isTouchable, (err) => {
}
console.info('Succeeded in setting the window to be touchable.');
});
```
### setTouchable<sup>(deprecated)</sup>
......@@ -5905,7 +5852,6 @@ promise.then(()=> {
}).catch((err)=>{
console.error('Failed to set the window to be touchable. Cause: ' + JSON.stringify(err));
});
```
## WindowStageEventType<sup>9+</sup>
......@@ -5957,11 +5903,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
let windowClass = null;
......@@ -5975,7 +5919,6 @@ export default class EntryAbility extends UIAbility {
});
}
};
```
### getMainWindow<sup>9+</sup>
......@@ -6006,11 +5949,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
let windowClass = null;
......@@ -6023,7 +5964,6 @@ export default class EntryAbility extends UIAbility {
});
}
};
```
### getMainWindowSync<sup>9+</sup>
......@@ -6054,11 +5994,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
try {
......@@ -6068,7 +6006,6 @@ export default class EntryAbility extends UIAbility {
};
}
};
```
### createSubWindow<sup>9+</sup>
......@@ -6100,11 +6037,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
let windowClass = null;
......@@ -6123,9 +6058,7 @@ export default class EntryAbility extends UIAbility {
};
}
};
```
### createSubWindow<sup>9+</sup>
createSubWindow(name: string): Promise&lt;Window&gt;
......@@ -6160,11 +6093,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
let windowClass = null;
......@@ -6181,7 +6112,6 @@ export default class EntryAbility extends UIAbility {
};
}
};
```
### getSubWindow<sup>9+</sup>
......@@ -6211,11 +6141,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
let windowClass = null;
......@@ -6229,9 +6157,7 @@ export default class EntryAbility extends UIAbility {
});
}
};
```
### getSubWindow<sup>9+</sup>
getSubWindow(): Promise&lt;Array&lt;Window&gt;&gt;
......@@ -6259,11 +6185,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
let windowClass = null;
......@@ -6276,9 +6200,7 @@ export default class EntryAbility extends UIAbility {
})
}
};
```
### loadContent<sup>9+</sup>
loadContent(path: string, storage: LocalStorage, callback: AsyncCallback&lt;void&gt;): void
......@@ -6309,11 +6231,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
storage : LocalStorage
onWindowStageCreate(windowStage) {
this.storage = new LocalStorage();
......@@ -6332,7 +6252,6 @@ export default class EntryAbility extends UIAbility {
};
}
};
```
### loadContent<sup>9+</sup>
......@@ -6370,11 +6289,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
storage : LocalStorage
onWindowStageCreate(windowStage) {
this.storage = new LocalStorage();
......@@ -6392,7 +6309,6 @@ export default class EntryAbility extends UIAbility {
};
}
};
```
### loadContent<sup>9+</sup>
......@@ -6424,11 +6340,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
try {
......@@ -6444,7 +6358,6 @@ export default class EntryAbility extends UIAbility {
};
}
};
```
### on('windowStageEvent')<sup>9+</sup>
......@@ -6476,11 +6389,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
try {
......@@ -6494,7 +6405,6 @@ export default class EntryAbility extends UIAbility {
};
}
};
```
### off('windowStageEvent')<sup>9+</sup>
......@@ -6526,11 +6436,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
try {
......@@ -6541,7 +6449,6 @@ export default class EntryAbility extends UIAbility {
};
}
};
```
### disableWindowDecor()<sup>9+</sup>
......@@ -6568,17 +6475,14 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('disableWindowDecor');
windowStage.disableWindowDecor();
}
};
```
### setShowOnLockScreen()<sup>9+</sup>
......@@ -6611,11 +6515,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example**
```ts
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
import Ability from '@ohos.application.Ability';
class myAbility extends Ability {
onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate');
try {
......@@ -6625,9 +6527,7 @@ export default class EntryAbility extends UIAbility {
};
}
};
```
## TransitionContext<sup>9+</sup>
Provides the context for the transition animation.
......@@ -6688,7 +6588,6 @@ controller.animationForShown = (context : window.TransitionContext) => {
}
console.info('complete transition end');
};
```
## TransitionController<sup>9+</sup>
......@@ -6739,7 +6638,6 @@ controller.animationForShown = (context : window.TransitionContext) => {
);
console.info('complete transition end');
};
```
### animationForHidden<sup>9+</sup>
......
......@@ -52,7 +52,7 @@ You can create a subwindow, such as a dialog box, and set its properties.
let windowClass = null;
// Method 1: Create a subwindow.
let config = {name: "subWindow", windowType: window.WindowType.TYPE_APP, ctx: this.context};
let config = {name: "subWindow", windowType: window.WindowType.TYPE_APP};
window.createWindow(config, (err, data) => {
if (err.code) {
console.error('Failed to create the subWindow. Cause: ' + JSON.stringify(err));
......
......@@ -390,4 +390,3 @@ A floating window is created based on an existing task. It is always displayed i
};
```
<!--no_check-->
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册