diff --git a/en/application-dev/reference/apis/js-apis-Context.md b/en/application-dev/reference/apis/js-apis-Context.md index 6a1909464162d6dfe49be1b0230efb1778de20f7..bc7b0afa88f6e9ee253b8cd8af3a5ba6633ce8b6 100644 --- a/en/application-dev/reference/apis/js-apis-Context.md +++ b/en/application-dev/reference/apis/js-apis-Context.md @@ -1,5 +1,8 @@ # Context Module +> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
+> 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. + ## Modules to Import ```js @@ -15,7 +18,7 @@ var context = featureAbility.getContext(); context.getOrCreateLocalDir() ``` -## Context.getOrCreateLocalDir +## Context.getOrCreateLocalDir7+ getOrCreateLocalDir(callback: AsyncCallback\): void @@ -43,7 +46,7 @@ context.getOrCreateLocalDir((err, data)=>{ -## Context.getOrCreateLocalDir +## Context.getOrCreateLocalDir7+ getOrCreateLocalDir(): Promise\ @@ -71,7 +74,7 @@ context.getOrCreateLocalDir().then((data) => { -## Context.verifyPermission +## Context.verifyPermission7+ verifyPermission(permission: string, options: PermissionOptions, callback: AsyncCallback\): void @@ -100,7 +103,7 @@ bundle.getBundleInfo('com.context.test', 1, (datainfo) =>{ -## Context.verifyPermission +## Context.verifyPermission7+ verifyPermission(permission: string, callback: AsyncCallback\): void @@ -123,7 +126,7 @@ var context = featureAbility.getContext(); context.verifyPermission("com.example.permission") ``` -## Context.verifyPermission +## Context.verifyPermission7+ verifyPermission(permission: string, options?: PermissionOptions): Promise\ @@ -158,7 +161,7 @@ context.verifyPermission('com.context.permission',Permission).then((data) => { -## Context.requestPermissionsFromUser +## Context.requestPermissionsFromUser7+ requestPermissionsFromUser(permissions: Array\, requestCode: number, resultCallback: AsyncCallback<[PermissionRequestResult](#permissionrequestresult)>): void @@ -194,7 +197,7 @@ context.requestPermissionsFromUser( -## Context.getApplicationInfo +## Context.getApplicationInfo7+ getApplicationInfo(callback: AsyncCallback\): void @@ -218,7 +221,7 @@ context.getApplicationInfo() -## Context.getApplicationInfo +## Context.getApplicationInfo7+ getApplicationInfo(): Promise\ @@ -245,7 +248,7 @@ context.getApplicationInfo().then((data) => { -## Context.getBundleName +## Context.getBundleName7+ getBundleName(callback: AsyncCallback\): void @@ -269,7 +272,7 @@ context.getBundleName() -## Context.getBundleName +## Context.getBundleName7+ getBundleName(): Promise\ @@ -296,7 +299,7 @@ context.getBundleName().then((data) => { -## Context.getProcessInfo +## Context.getProcessInfo7+ getProcessInfo(callback: AsyncCallback\): void @@ -320,7 +323,7 @@ context.getProcessInfo() -## Context.getProcessInfo +## Context.getProcessInfo7+ getProcessInfo(): Promise\ @@ -347,7 +350,7 @@ context.getProcessInfo().then((data) => { -## Context.getElementName +## Context.getElementName7+ getElementName(callback: AsyncCallback\): void @@ -373,7 +376,7 @@ context.getElementName() -## Context.getElementName +## Context.getElementName7+ getElementName(): Promise\ @@ -400,7 +403,7 @@ context.getElementName().then((data) => { }); ``` -## Context.getProcessName +## Context.getProcessName7+ getProcessName(callback: AsyncCallback\): void @@ -424,7 +427,7 @@ context.getProcessName() -## Context.getProcessName +## Context.getProcessName7+ getProcessName(): Promise\ @@ -451,7 +454,7 @@ context.getProcessName().then((data) => { -## Context.getCallingBundle +## Context.getCallingBundle7+ getCallingBundle(callback: AsyncCallback\): void @@ -475,7 +478,7 @@ context.getCallingBundle() -## Context.getCallingBundle +## Context.getCallingBundle7+ getCallingBundle(): Promise\ @@ -606,7 +609,7 @@ context.getFilesDir().then((data) => { }); ``` -## Context.getOrCreateDistributedDir +## Context.getOrCreateDistributedDir7+ getOrCreateDistributedDir(callback: AsyncCallback\): void @@ -636,7 +639,7 @@ context.getOrCreateDistributedDir((err, data) => { }); ``` -## Context.getOrCreateDistributedDir +## Context.getOrCreateDistributedDir7+ getOrCreateDistributedDir(): Promise\ @@ -662,7 +665,7 @@ context.getOrCreateDistributedDir().then((data) => { }); ``` -## Context.getAppType +## Context.getAppType7+ getAppType(callback: AsyncCallback\): void @@ -690,7 +693,7 @@ context.getAppType((err, data) => { }); ``` -## Context.getAppType +## Context.getAppType7+ getAppType(): Promise\ @@ -714,7 +717,7 @@ context.getAppType().then((data) => { }); ``` -## Context.getHapModuleInfo +## Context.getHapModuleInfo7+ getHapModuleInfo(callback: AsyncCallback\): void @@ -742,7 +745,7 @@ context.getHapModuleInfo((err, data) => { }); ``` -## Context.getHapModuleInfo +## Context.getHapModuleInfo7+ getHapModuleInfo(): Promise\ @@ -766,7 +769,7 @@ context.getHapModuleInfo().then((data) => { }); ``` -## Context.getAppVersionInfo +## Context.getAppVersionInfo7+ getAppVersionInfo(callback: AsyncCallback\): void @@ -794,7 +797,7 @@ context.getAppVersionInfo((err, data) => { }); ``` -## Context.getAppVersionInfo +## Context.getAppVersionInfo7+ getAppVersionInfo(): Promise\ @@ -818,7 +821,7 @@ context.getAppVersionInfo().then((data) => { }); ``` -## Context.getAbilityInfo +## Context.getAbilityInfo7+ getAbilityInfo(callback: AsyncCallback\): void @@ -846,7 +849,7 @@ context.getAbilityInfo((err, data) => { }); ``` -## Context.getAbilityInfo +## Context.getAbilityInfo7+ getAbilityInfo(): Promise\ @@ -870,7 +873,7 @@ context.getAbilityInfo().then((data) => { }); ``` -## Context.getApplicationContext +## Context.getApplicationContext7+ getApplicationContext(): Context @@ -891,7 +894,7 @@ import featureAbility from '@ohos.ability.featureAbility' var context = featureAbility.getContext().getApplicationContext(); ``` -## PermissionOptions +## PermissionOptions7+ **System capability**: SystemCapability.Ability.AbilityRuntime.Core @@ -900,7 +903,7 @@ var context = featureAbility.getContext().getApplicationContext(); | pid | Read-only | number | No | Process ID.| | uid | Read-only | number | No | User ID.| -## PermissionRequestResult +## PermissionRequestResult7+ **System capability**: SystemCapability.Ability.AbilityRuntime.Core @@ -910,7 +913,7 @@ var context = featureAbility.getContext().getApplicationContext(); | permissions | Read-only | Array\ | Yes | Permissions requested. | | authResults | Read-only | Array\ | Yes | Permission request result. | -## HapModuleInfo +## HapModuleInfo7+ Describes the HAP module information. @@ -933,7 +936,7 @@ Describes the HAP module information. | installationFree | boolean | Yes | No | When installation-free is supported. | | mainElementName | string | Yes| No| Information about the entry ability.| -## AppVersionInfo +## AppVersionInfo7+ | Name | Type| Readable | Writable | Description| | ------ | ------ | ------| ------ | ------ | diff --git a/en/application-dev/reference/apis/js-apis-configurationconstant.md b/en/application-dev/reference/apis/js-apis-configurationconstant.md index 55f42b926d4bfcbb4b07a48185611b22a92cbc32..ef0917ba4a9d1838832d14117a2b002d9083f1f8 100644 --- a/en/application-dev/reference/apis/js-apis-configurationconstant.md +++ b/en/application-dev/reference/apis/js-apis-configurationconstant.md @@ -1,6 +1,6 @@ # ConfigurationConstant -> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** +> ![icon-note.gif](public_sys-resources/icon-note.gif) **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. @@ -34,7 +34,7 @@ ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT | COLOR_MODE_LIGHT | 1 | Light mode.| -## ConfigurationConstant.Direction +## ConfigurationConstant.Direction9+ The value is obtained through the **ConfigurationConstant.Direction** API. @@ -48,12 +48,12 @@ ConfigurationConstant.Direction.DIRECTION_VERTICAL | Name| Value| Description| | -------- | -------- | -------- | -| DIRECTION_NOT_SET9+ | -1 | Unspecified direction.| -| DIRECTION_VERTICAL9+ | 0 | Vertical direction.| -| DIRECTION_HORIZONTAL9+ | 1 | Horizontal direction.| +| DIRECTION_NOT_SET | -1 | Unspecified direction.| +| DIRECTION_VERTICAL | 0 | Vertical direction.| +| DIRECTION_HORIZONTAL | 1 | Horizontal direction.| -## ConfigurationConstant.ScreenDensity +## ConfigurationConstant.ScreenDensity9+ The value is obtained through the **ConfigurationConstant.ScreenDensity** API. @@ -67,10 +67,10 @@ ConfigurationConstant.ScreenDensity.SCREEN_DENSITY_NOT_SET | Name| Value| Description| | -------- | -------- | -------- | -| SCREEN_DENSITY_NOT_SET9+ | 0 | Unspecified screen resolution.| -| SCREEN_DENSITY_SDPI9+ | 120 | The screen resolution is sdpi.| -| SCREEN_DENSITY_MDPI9+ | 160 | The screen resolution is mdpi.| -| SCREEN_DENSITY_LDPI9+ | 240 | The screen resolution is ldpi.| -| SCREEN_DENSITY_XLDPI9+ | 320 | The screen resolution is xldpi.| -| SCREEN_DENSITY_XXLDPI9+ | 480 | The screen resolution is xxldpi.| -| SCREEN_DENSITY_XXXLDPI9+ | 640 | The screen resolution is xxxldpi.| +| SCREEN_DENSITY_NOT_SET | 0 | Unspecified screen resolution.| +| SCREEN_DENSITY_SDPI | 120 | The screen resolution is sdpi.| +| SCREEN_DENSITY_MDPI | 160 | The screen resolution is mdpi.| +| SCREEN_DENSITY_LDPI | 240 | The screen resolution is ldpi.| +| SCREEN_DENSITY_XLDPI | 320 | The screen resolution is xldpi.| +| SCREEN_DENSITY_XXLDPI | 480 | The screen resolution is xxldpi.| +| SCREEN_DENSITY_XXXLDPI | 640 | The screen resolution is xxxldpi.| diff --git a/en/application-dev/reference/apis/js-apis-extension-context.md b/en/application-dev/reference/apis/js-apis-extension-context.md index 3a18f757b31e1e6ce33f31ae11f23c7ea840b0f8..51ce88f1cfd16bd960b2a14290d2d51481f2085e 100644 --- a/en/application-dev/reference/apis/js-apis-extension-context.md +++ b/en/application-dev/reference/apis/js-apis-extension-context.md @@ -1,7 +1,7 @@ # ExtensionContext -> ![icon-note.gif](public_sys-resources/icon-note.gif) **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. +> ![icon-note.gif](public_sys-resources/icon-note.gif) **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. Implements the extension context. This module is inherited from **Context**. @@ -14,3 +14,4 @@ Implements the extension context. This module is inherited from **Context**. | Name| Type| Readable| Writable| Description| | -------- | -------- | -------- | -------- | -------- | | currentHapModuleInfo | HapModuleInfo | Yes| No| Information about the current HAP. | +| config | Configuration | Yes| No| Module configuration information.| diff --git a/en/application-dev/reference/apis/js-apis-extensionrunninginfo.md b/en/application-dev/reference/apis/js-apis-extensionrunninginfo.md index f5f75e537f719657bed473a63899b15cae850f4b..fc1542d64377ca689f9a94314a5b488471679f17 100644 --- a/en/application-dev/reference/apis/js-apis-extensionrunninginfo.md +++ b/en/application-dev/reference/apis/js-apis-extensionrunninginfo.md @@ -1,7 +1,7 @@ # ExtensionRunningInfo -> ![icon-note.gif](public_sys-resources/icon-note.gif) **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. +> ![icon-note.gif](public_sys-resources/icon-note.gif) **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. Provides extension running information. diff --git a/en/application-dev/reference/apis/js-apis-formextensioncontext.md b/en/application-dev/reference/apis/js-apis-formextensioncontext.md index faa3bd6c6f82018ca61c9ba1f008dbc1e72dae9f..c4eb1e6ae45c9352c9c099692d32c68613f28d39 100644 --- a/en/application-dev/reference/apis/js-apis-formextensioncontext.md +++ b/en/application-dev/reference/apis/js-apis-formextensioncontext.md @@ -1,7 +1,7 @@ # FormExtensionContext -> ![icon-note.gif](public_sys-resources/icon-note.gif) **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. +> ![icon-note.gif](public_sys-resources/icon-note.gif) **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. Implements the context that provides the capabilities and APIs of **FormExtension**. This class is inherited from **ExtensionContext**.