@@ -25,9 +25,9 @@ Checks whether this application is undergoing a stability test. This API uses an
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | No| Callback used to return the result. If the application is undergoing a stability test, **true** will be returned; otherwise, **false** will be returned.|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | No| Callback used to return the result. If the application is undergoing a stability test, **true** will be returned; otherwise, **false** will be returned.|
**Example**
...
...
@@ -49,9 +49,9 @@ Checks whether this application is undergoing a stability test. This API uses a
**Return value**
| Type| Description|
| -------- | -------- |
| Promise<boolean> | Promise used to return the result. If the application is undergoing a stability test, **true** will be returned; otherwise, **false** will be returned.|
| Type| Description|
| -------- | -------- |
| Promise<boolean> | Promise used to return the result. If the application is undergoing a stability test, **true** will be returned; otherwise, **false** will be returned.|
**Example**
...
...
@@ -75,9 +75,9 @@ Checks whether this application is running on a RAM constrained device. This API
**Return value**
| Type| Description|
| -------- | -------- |
| Promise<boolean> | Promise used to return whether the application is running on a RAM constrained device. If the application is running on a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.|
| Type| Description|
| -------- | -------- |
| Promise<boolean> | Promise used to return whether the application is running on a RAM constrained device. If the application is running on a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.|
**Example**
...
...
@@ -99,9 +99,9 @@ Checks whether this application is running on a RAM constrained device. This API
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | No| Callback used to return whether the application is running on a RAM constrained device. If the application is running on a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | No| Callback used to return whether the application is running on a RAM constrained device. If the application is running on a RAM constrained device, **true** will be returned; otherwise, **false** will be returned.|
**Example**
...
...
@@ -122,9 +122,9 @@ Obtains the memory size of this application. This API uses a promise to return t
**Return value**
| Type| Description|
| -------- | -------- |
| Promise<number> | Size of the application memory.|
| Type| Description|
| -------- | -------- |
| Promise<number> | Size of the application memory.|
**Example**
...
...
@@ -146,9 +146,9 @@ Obtains the memory size of this application. This API uses an asynchronous callb
**Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<number> | No| Size of the application memory.|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<number> | No| Size of the application memory.|
**Example**
...
...
@@ -160,7 +160,7 @@ Obtains the memory size of this application. This API uses an asynchronous callb
@@ -23,9 +23,9 @@ The name of a resource qualifier consists of one or more qualifiers that represe
Table1 Resource qualifiers
| Data Type | Description and Value Range |
| Data Type | Description and Value Range |
| -------- | -------- |
| Screen density | Indicates the screen density of the device, in dpi. The value can be:<br/>- ldpi: low-density screen (~120 dpi) (0.75 x Reference density)<br/>- mdpi: medium-density screen (~160 dpi) (reference density)<br/>- hdpi: high-density screen (~240 dpi) (1.5 x Reference density)<br/>- xhdpi: extra high-density screen (~320 dpi) (2.0 x Reference density)<br/>- xxhdpi: extra extra high-density screen (~480 dpi) (3.0 x Reference density)<br/>- xxxhdpi: extra extra extra high-density screen (~640 dpi) (4.0 x Reference density) |
| Screen density | Indicates the screen density of the device, in dpi. The value can be:<br/>- ldpi: low-density screen (~120 dpi) (0.75 x Reference density)<br/>- mdpi: medium-density screen (~160 dpi) (reference density)<br/>- hdpi: high-density screen (~240 dpi) (1.5 x Reference density)<br/>- xhdpi: extra high-density screen (~320 dpi) (2.0 x Reference density)<br/>- xxhdpi: extra extra high-density screen (~480 dpi) (3.0 x Reference density)<br/>- xxxhdpi: extra extra extra high-density screen (~640 dpi) (4.0 x Reference density) |
## Rules for Matching Qualifiers Files and Device Resources
...
...
@@ -41,7 +41,7 @@ You can use the $r syntax in the application development files .hml and .js to f
| Attribute | Type | Description |
| -------- | -------- | -------- |
| $r | (key: string) => string | Obtains the resource content that matches the specific qualifiers, for example, this.$r('strings.hello loaded).<br/>Parameter description:<br/>- key: key value defined in the resource qualifier file, for example, strings.hello.<br/> |
| $r | (key: string) => string | Obtains the resource content that matches the specific qualifiers, for example, this.$r('strings.hello loaded).<br/>Parameter description:<br/>- key: key value defined in the resource qualifier file, for example, strings.hello. |
This document describes the changes of APIs in OpenHarmony 3.0 LTS when compared with OpenHarmony 2.2 Beta2.
## Standard System API Changes
| Module| API| Change Type| Change Description|
| Module | API | Change Type | Change Description |
| -------- | -------- | -------- | -------- |
|Multi-language Runtime-worker|postMessage(obj):void|Added|Used by the host thread to transfer data to the worker.|
|Multi-language Runtime-worker|postMessage(message: Object, options?: PostMessageOptions):void|Added|Used by the host thread to transfer the data control permission of the array buffer to the worker.|
|Multi-language Runtime-worker|terminate():void|Added|Used by the host thread to proactively terminate the worker.|
|Multi-language Runtime-worker|on(type: string, listener: EventListener): void|Added|Adds a callback for the worker.|
|Multi-language Runtime-worker|once(type: string, listener: EventListener): void|Added|Adds a one-shot callback for the worker.|
|Multi-language Runtime-worker|off(type: string, listener?: EventListener): void|Added|Deletes a callback added for the worker.|
|Multi-language Runtime-worker|addEventListener(type: string, listener: EventListener): void|Added|Adds a callback for the worker.|
|Multi-language Runtime-worker|removeEventListener(type: string, listener?: EventListener): void|Added|Deletes a callback added for the worker.|
|Multi-language Runtime-worker|removeAllListener(): void|Added|Deletes all callbacks added for the worker.|
|Multi-language Runtime-worker|dispatchEvent(event: Event): boolean|Added|Dispatches a specific event to the worker.|
|Multi-language Runtime-parentPort|postMessage(obj):void|Added|Used by the worker to transfer data to the host thread.|
|Multi-language Runtime-parentPort|postMessage(message: Object, options?: PostMessageOptions):void|Added|Used by the worker to transfer the data control permission of the array buffer to the host thread.|
|Multi-language Runtime-parentPort|close(): void|Added|Used by the worker to proactively terminate itself.|
|Multi - language Runtime - worker|postMessage(obj):void|Added|Used by the host thread to transfer data to the worker.|
|Multi - language Runtime - worker|postMessage(message: Object, options?: PostMessageOptions):void|Added|Used by the host thread to transfer the data control permission of the array buffer to the worker.|
|Multi - language Runtime - worker|terminate():void|Added|Used by the host thread to proactively terminate the worker.|
|Multi - language Runtime - worker|on(type: string, listener: EventListener): void|Added|Adds a callback for the worker.|
|Multi - language Runtime - worker|once(type: string, listener: EventListener): void|Added|Adds a one - shot callback for the worker.|
|Multi - language Runtime - worker|off(type: string, listener?: EventListener): void|Added|Deletes a callback added for the worker.|
|Multi - language Runtime - worker|addEventListener(type: string, listener: EventListener): void|Added|Adds a callback for the worker.|
|Multi - language Runtime - worker|removeEventListener(type: string, listener?: EventListener): void|Added|Deletes a callback added for the worker.|
|Multi - language Runtime - worker|removeAllListener(): void|Added|Deletes all callbacks added for the worker.|
|Multi - language Runtime - worker|dispatchEvent(event: Event): boolean|Added|Dispatches a specific event to the worker.|
|Multi - language Runtime - parentPort|postMessage(obj):void|Added|Used by the worker to transfer data to the host thread.|
|Multi - language Runtime - parentPort|postMessage(message: Object, options?: PostMessageOptions):void|Added|Used by the worker to transfer the data control permission of the array buffer to the host thread.|
|Multi - language Runtime - parentPort|close(): void|Added|Used by the worker to proactively terminate itself.|
|Multi - language Runtime - Util|printf(format: string, ...args: Object[]): string|Added|-|
|Multi - language Runtime - Util|getErrorString(errno: number): string|Added|-|
@@ -7,8 +7,8 @@ The table below lists the APIs changes of the Distributed Data Management subsys
| Module | API | Change Type | Change Description |
| -------- | -------- | -------- | -------- |
| Distributed Hardware Subsystem - DeviceManager| release(): void | Deleted| This API is deleted to reduce security risks.|
| Distributed Hardware Subsystem - DeviceManager| getTrustedDeviceListSync(): Array<DeviceInfo> | Deleted| This API is deleted to reduce security risks.|
| Distributed Hardware Subsystem - DeviceManager| on(type: 'deviceStateChange', callback: Callback<{action:DeviceStateChangeAction,device:DeviceInfo}>): void | Deleted| This API is deleted to reduce security risks.|
| Distributed Hardware Subsystem - DeviceManager| off(type: 'deviceStateChange', callback?: Call back<{action:DeviceStateChangeAction,device:DeviceInfo}>): void | Deleted| This API is deleted to reduce security risks.|
| Distributed Hardware Subsystem - DeviceManager| getTrustedDeviceListSync(): Array\<DeviceInfo> | Deleted| This API is deleted to reduce security risks.|
| Distributed Hardware Subsystem - DeviceManager| on(type: 'deviceStateChange', callback: Callback\<{ action: DeviceStateChangeAction, device: DeviceInfo }>): void | Deleted| This API is deleted to reduce security risks.|
| Distributed Hardware Subsystem - DeviceManager| off(type: 'deviceStateChange', callback?: Callback\<{ action: DeviceStateChangeAction, device: DeviceInfo }>): void | Deleted| This API is deleted to reduce security risks.|
| Distributed Hardware Subsystem - DeviceManager| on(type: 'serviceDie', callback: () => void): void | Deleted| This API is deleted to reduce security risks.|
| Distributed Hardware Subsystem - DeviceManager| off(type: 'serviceDie', callback?: () => void): void | Deleted| This API is deleted to reduce security risks.|
@@ -4,28 +4,28 @@ This document describes the changes of APIs in OpenHarmony 3.1 Beta when compare
## Standard System API Changes
| Module| API| Change Type| Change Description|
| Module| API | Change Type| Change Description |
| -------- | -------- | -------- | -------- |
| System Application - settings| getUri(name: string): string | Added| Added the API for obtaining the URI of a string.|
| System Application - settings| getUri(name: string): string | Added| Added the API for obtaining the URI of a string.|
| System Application - settings| getValue(dataAbilityHelper: DataAbilityHelper, name: string, defValue: string): string | Added| Added the API for obtaining the value of a string in the database.|
| System Application - settings| setValue(dataAbilityHelper: DataAbilityHelper, name: string, value: string): boolean | Added| Added the API for saving a string name and its value in the database.|
| Misc Services - systemTime| getCurrentTime(callback: AsyncCallback<number>): void | Added| Added the API for obtaining the number of milliseconds elapsed since the Unix epoch.|
| Misc Services - systemTime| getCurrentTime(): Promise<number> | Added| Added the API for obtaining the number of milliseconds elapsed since the Unix epoch.|
| Misc Services - systemTime| getCurrentTimeNs(callback: AsyncCallback<number>): void | Added| Added the API for obtaining the number of nanoseconds elapsed since the Unix epoch.|
| Misc Services - systemTime| getCurrentTimeNs(): Promise<number> | Added| Added the API for obtaining the number of nanoseconds elapsed since the Unix epoch.|
| Misc Services - systemTime| getRealActiveTime(callback: AsyncCallback<number>): void | Added| Added the API for obtaining the number of milliseconds elapsed since the system boot, excluding the deep sleep time.|
| Misc Services - systemTime| getRealActiveTime(): Promise<number> | Added| Added the API for obtaining the number of milliseconds elapsed since the system boot, excluding the deep sleep time.|
| Misc Services - systemTime| getRealActiveTimeNs(callback: AsyncCallback<number>): void | Added| Added the API for obtaining the number of nanoseconds elapsed since the system boot, excluding the deep sleep time.|
| Misc Services - systemTime| getRealActiveTimeNs(): Promise<number> | Added| Added the API for obtaining the number of nanoseconds elapsed since the system boot, excluding the deep sleep time.|
| Misc Services - systemTime| getRealTime(callback: AsyncCallback<number>): void | Added| Added the API for obtaining the number of milliseconds elapsed since the system boot, including the deep sleep time.|
| Misc Services - systemTime| getRealTime(): Promise<number> | Added| Added the API for obtaining the number of milliseconds elapsed since the system boot, including the deep sleep time.|
| Misc Services - systemTime| getRealTimeNs(callback: AsyncCallback<number>): void | Added| Added the API for obtaining the number of nanoseconds elapsed since the system boot, including the deep sleep time.|
| Misc Services - systemTime| getRealTimeNs(): Promise<number> | Added| Added the API for obtaining the number of nanoseconds elapsed since the system boot, including the deep sleep time.|
| Misc Services - systemTime| getDate(callback: AsyncCallback<Date>): void | Added| Added the API for obtaining the system date.|
| Misc Services - systemTime| getDate(): Promise<Date> | Added| Added the API for obtaining the system date.|
| Misc Services - systemTime| getTimeZone(callback: AsyncCallback<string>): void | Added| Added the API for obtaining the system time zone.|
| Misc Services - systemTime| getTimeZone(): Promise<string> | Added| Added the API for obtaining the system time zone.|
| ArkUI Framework - Universal Events| onAreaChange (Component Area Change Event)| Added| Added the API for subscribing to component area (including the size and position) changes.|
| Misc Services - systemTime| getCurrentTime(callback: AsyncCallback\<number>): void | Added | Added the API for obtaining the number of milliseconds elapsed since the Unix epoch. |
| Misc Services - systemTime| getCurrentTime(): Promise\<number> | Added | Added the API for obtaining the number of milliseconds elapsed since the Unix epoch. |
| Misc Services - systemTime| getCurrentTimeNs(callback: AsyncCallback\<number>): void | Added | Added the API for obtaining the number of nanoseconds elapsed since the Unix epoch. |
| Misc Services - systemTime| getCurrentTimeNs(): Promise\<number> | Added | Added the API for obtaining the number of nanoseconds elapsed since the Unix epoch. |
| Misc Services - systemTime| getRealActiveTime(callback: AsyncCallback\<number>): void | Added | Added the API for obtaining the number of milliseconds elapsed since the system boot, excluding the deep sleep time.|
| Misc Services - systemTime| getRealActiveTime(): Promise\<number> | Added | Added the API for obtaining the number of milliseconds elapsed since the system boot, excluding the deep sleep time.|
| Misc Services - systemTime| getRealActiveTimeNs(callback: AsyncCallback\<number>): void | Added | Added the API for obtaining the number of nanoseconds elapsed since the system boot, excluding the deep sleep time.|
| Misc Services - systemTime| getRealActiveTimeNs(): Promise\<number> | Added | Added the API for obtaining the number of nanoseconds elapsed since the system boot, excluding the deep sleep time.|
| Misc Services - systemTime| getRealTime(callback: AsyncCallback\<number>): void | Added | Added the API for obtaining the number of milliseconds elapsed since the system boot, including the deep sleep time. |
| Misc Services - systemTime| getRealTime(): Promise\<number> | Added | Added the API for obtaining the number of milliseconds elapsed since the system boot, including the deep sleep time. |
| Misc Services - systemTime| getRealTimeNs(callback: AsyncCallback\<number>): void | Added | Added the API for obtaining the number of nanoseconds elapsed since the system boot, including the deep sleep time. |
| Misc Services - systemTime| getRealTimeNs(): Promise\<number> | Added | Added the API for obtaining the number of nanoseconds elapsed since the system boot, including the deep sleep time. |
| Misc Services - systemTime| getDate(callback: AsyncCallback\<Date>): void | Added | Added the API for obtaining the current time. |
| Misc Services - systemTime| getDate(): Promise\<Date> | Added | Added the API for obtaining the current time. |
| Misc Services - systemTime| getTimeZone(callback: AsyncCallback\<string>): void | Added | Added the API for obtaining the system time zone. |
| Misc Services - systemTime| getTimeZone(): Promise\<string> | Added | Added the API for obtaining the system time zone. |
| ArkUI Framework - Universal Events | onAreaChange| Added | Added the event indicating component area (including the size and position) changes.|
| ArkUI Framework - Universal Attributes| responseRegion| Added| Added the attribute for touch hotspot settings.|
| ArkUI Framework - Universal Attributes| touchable| Added| Added the attribute that specifies whether a component is touchable.|
| ArkUI Framework - Universal Attributes| stateStyle| Added| Added the attribute that specifies the styles of the pressed and disabled states of a component.|
...
...
@@ -42,27 +42,27 @@ This document describes the changes of APIs in OpenHarmony 3.1 Beta when compare
| ArkUI Framework - Canvas Components| Lottie | Added| Added the support for the Lottie library.|
| ArkUI Framework - Global UI Methods| ActionSheet | Added| Added the support for the list selection dialog box.|
| USB Service - USB| getDevices(): Array<Readonly<USBDevice>> | Added| Added the API for obtaining USB devices.|
| USB Service - USB| connectDevice(device: USBDevice): Readonly<USBDevicePipe> | Added| Added the API for opening a USB device based on the device information returned by **getDevices()**.|
| USB Service - USB| getDevices(): Array\<Readonly\<USBDevice>> | Added | Added the API for obtaining USB devices.|
| USB Service - USB| connectDevice(device: USBDevice): Readonly\<USBDevicePipe> | Added| Added the API for opening a USB device based on the device information returned by **getDevices()**.|
| USB Service - USB| hasRight(deviceName: string): boolean | Added| Added the API for checking whether the caller has the permission to access the USB device.|
| USB Service - USB| requestRight(deviceName: string): Promise<boolean> | Added| Added the API for requesting the temporary permission for the caller to access the USB device.|
| USB Service - USB| requestRight(deviceName: string): Promise\<boolean> | Added| Added the API for requesting the temporary permission for the caller to access the USB device.|
| USB Service - USB| claimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): number | Added| Added the API for claiming a USB interface.|
| USB Service - USB| releaseInterface(pipe: USBDevicePipe, iface: USBInterface): number | Added| Added the API for releasing a USB interface.|
| USB Service - USB| setConfiguration(pipe: USBDevicePipe, config: USBConfig): number | Added| Added the API for setting USB device configurations.|
| USB Service - USB| setInterface(pipe: USBDevicePipe, iface: USBInterface): number | Added| Added the API for setting USB device interfaces.|
| USB Service - USB| getRawDescriptor(pipe: USBDevicePipe): Uint8Array | Added| Added the API for obtaining the raw USB descriptor.|
| USB Service - USB| getFileDescriptor(pipe: USBDevicePipe): number | Added| Added the API for obtaining the file descriptor.|
| USB Service - USB| controlTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout?: number): Promise<number> | Added| Added the API for control transfer.|
| USB Service - USB| bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout?: number): Promise<number> | Added| Added the API for bulk transfer.|
| USB Service - USB| controlTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout?: number): Promise\<number> | Added| Added the API for control transfer.|
| USB Service - USB| bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout?: number): Promise\<number> | Added| Added the API for bulk transfer.|
| USB Service - USB| closePipe(pipe: USBDevicePipe): number | Added| Added the API for closing the USB device pipe.|
| Application Framework - bundle| function cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback<void>): void;<br/>function cleanBundleCacheFiles(bundleName: string): Promise<void>; | Added| Added the APIs for clearing the cache of an application.|
| Application Framework - bundle| function setApplicationEnabled(bundleName: string, isEnable: boolean, callback: AsyncCallback<void>): void;<br/>function setApplicationEnabled(bundleName: string, isEnable: boolean): Promise<void>; | Added| Added the API for setting whether to enable an application.|
| Application Framework - bundle| function setAbilityEnabled(info: AbilityInfo, isEnable: boolean, callback: AsyncCallback<void>): void;<br/>function setAbilityEnabled(info: AbilityInfo, isEnable: boolean): Promise<void>; | Added| Added the APIs for setting whether to enable an ability.|
| Application Framework - bundle.innerBundleManager| function getLauncherAbilityInfos(bundleName: string, userId: number, callback: AsyncCallback<Array<LauncherAbilityInfo>>) : void;<br/>function getLauncherAbilityInfos(bundleName: string, userId: number) : Promise<Array<LauncherAbilityInfo>>; | Added| Added the APIs for obtaining the launcher ability information by **bundleName**.|
| Application Framework - bundle.innerBundleManager| function on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback, callback: AsyncCallback<string>) : void;<br/>function on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback): Proimise<string>; | Added| Added the APIs for subscribing to bundle status changes.|
| Application Framework - bundle.innerBundleManager| function off(type:"BundleStatusChange", callback: AsyncCallback<string>) : void;<br/>function off(type:"BundleStatusChange"): Proimise<string>; | Added| Added the APIs for unsubscribing from bundle status changes.|
| Application Framework - bundle.innerBundleManager| function getAllLauncherAbilityInfos(userId: number, callback: AsyncCallback<Array<LauncherAbilityInfo>>) : void;<br/>function getAllLauncherAbilityInfos(userId: number) : Promise<Array<LauncherAbilityInfo>>; | Added| Added the APIs for obtaining the application abilities on all launchers by **userId**.|
| Application Framework - bundle.innerBundleManager| function getShortcutInfos(bundleName :string, callback: AsyncCallback<Array<ShortcutInfo>>) : void;<br/>function getShortcutInfos(bundleName : string) : Promise<Array<ShortcutInfo>>; | Added| Added the APIs for obtaining the application shortcut information by **bundleName**.|
| Application Framework - bundle | cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback\<void>): void;<br>cleanBundleCacheFiles(bundleName: string): Promise\<void>; | Added | Added the APIs for clearing the cache of an application. |
| Application Framework - bundle | setApplicationEnabled(bundleName: string, isEnable: boolean, callback: AsyncCallback\<void>): void;<br>setApplicationEnabled(bundleName: string, isEnable: boolean): Promise\<void>; | Added | Added the API for setting whether to enable an application. |
| Application Framework - bundle | setAbilityEnabled(info: AbilityInfo, isEnable: boolean, callback: AsyncCallback\<void>): void;<br>setAbilityEnabled(info: AbilityInfo, isEnable: boolean): Promise\<void>; | Added | Added the API for setting whether to enable an ability. |
| Application Framework - bundle.innerBundleManager| getLauncherAbilityInfos(bundleName: string, userId: number, callback: AsyncCallback\<Array\<LauncherAbilityInfo>>) : void;<br>getLauncherAbilityInfos(bundleName: string, userId: number) : Promise\<Array\<LauncherAbilityInfo>>; | Added | Added the API for obtaining the launcher ability information by **bundleName**. |
| Application Framework - bundle.innerBundleManager| on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback, callback: AsyncCallback\<string>) : void;<br>on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback): Proimise\<string>; | Added | Added the API for subscribing to bundle status changes. |
| Application Framework - bundle.innerBundleManager| off(type:"BundleStatusChange", callback: AsyncCallback\<string>) : void;<br>off(type:"BundleStatusChange"): Proimise\<string>; | Added | Added the APIs for unsubscribing from bundle status changes. |
| Application Framework - bundle.innerBundleManager| getAllLauncherAbilityInfos(userId: number, callback: AsyncCallback\<Array\<LauncherAbilityInfo>>) : void;<br>getAllLauncherAbilityInfos(userId: number) : Promise\<Array\<LauncherAbilityInfo>>; | Added | Added the APIs for obtaining the application abilities on all launchers by **userId**.|
| Application Framework - bundle.innerBundleManager| getShortcutInfos(bundleName :string, callback: AsyncCallback\<Array\<ShortcutInfo>>) : void;<br>getShortcutInfos(bundleName : string) : Promise\<Array\<ShortcutInfo>>; | Added | Added the API for obtaining the application shortcut information by **bundleName**. |
| DSoftBus - rpc.IRemoteObject| PING_TRANSACTION | Deleted| Deleted since it is not implemented in API Version 7. The deletion has no impact on existing applications.|
| DSoftBus - rpc.IRemoteObject| DUMP_TRANSACTION | Deleted| Deleted since it is not implemented in API Version 7. The deletion has no impact on existing applications.|
| DSoftBus - rpc.IRemoteObject| INTERFACE_TRANSACTION | Deleted| Deleted since it is not implemented in API Version 7. The deletion has no impact on existing applications.|
...
...
@@ -124,304 +124,304 @@ This document describes the changes of APIs in OpenHarmony 3.1 Beta when compare
| DSoftBus - rpc.Proxy| queryLocalInterface(interface: string): IRemoteBroker | Modified| Corrected the return type to **IRemoteBroker**. This change does not affect existing applications.|
| Globalization - Intl| RelativeTimeFormat.format(value: number, unit: string): string; | Added| Added the API for formatting the relative time.|
| Globalization - Intl| RelativeTimeFormat.formatToParts(value: number, unit: string): Array<object>; | Added| Added the API for formatting the relative time. The result is divided into multiple parts and stored separately.|
| Globalization - Intl| RelativeTimeFormat.formatToParts(value: number, unit: string): Array<object>; | Added| Added the API for formatting the relative time. The result is divided into multiple parts and stored separately.|
| Globalization - Intl| RelativeTimeFormat.formatToParts(value: number, unit: string): Array\<object>; | Added| Added the API for formatting the relative time. The result is divided into multiple parts and stored separately.|
| Globalization - Intl| RelativeTimeFormat.formatToParts(value: number, unit: string): Array\<object>; | Added| Added the API for formatting the relative time. The result is divided into multiple parts and stored separately.|
| Globalization - Intl| PluralRules.constructor(); | Added| Added this constructor.|
| Globalization - Intl| Collator.compare(first: string, second: string): number; | Added| Added the API for comparing two strings.|
| Globalization - Intl| Collator.resolvedOptions(): CollatorOptions; | Added| Added the API for obtaining the attributes of a sorting object.|
| Globalization - I18N| function unitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: **number**, locale: **string**, style?: **string**): **string**; | Added| Added the API for unit conversion.|
| Globalization - I18N| function **constructor**(country: **string**, options?: PhoneNumberFormatOptions);<br/>function isValidNumber(**number**: **string**): boolean;<br/>function format(**number**: **string**): **string**; | Added| Added the APIs for formatting phone numbers.|
| Globalization - I18N| **function** isRTL(locale: **string**): boolean; | Added| Added the API for checking whether the localized script for the specified language is displayed from right to left.|
| Globalization - I18N| function getInstance(locale?:**string**): IndexUtil;<br/>function getIndexList(): Array<**string**>; | Added| Added the APIs for obtaining the alphabet index.|
| Globalization - I18N| isRTL(locale: string): boolean; | Added| Added the API for checking whether the localized script for the specified language is displayed from right to left.|
| Globalization - I18N| getLineInstance(locale: string): BreakIterator;<br>current(): number;<br>first(): number;<br>last(): number;<br>next(index?: number): number;<br>previous(): number;<br>setLineBreakText(text: string): void;<br>following(offset: number): number;<br>getLineBreakText(): string;<br>isBoundary(offset: number): boolean; | Added| Added the APIs for line feed.|
| Globalization - I18N| getInstance(locale?:string): IndexUtil;<br>getIndexList(): Array\<string>; | Added| Added the APIs for obtaining the alphabet index.|
| Event Notification - DoNotDisturbDate| type: notification.DoNotDisturbType | Added| Added the do-not-disturb (DND) time type.|
| Event Notification - DoNotDisturbDate| begin: Date | Added| Added the DND start time setting.|
| Event Notification - DoNotDisturbDate| end: Date | Added| Added the DND end time setting.|
| Event Notification - DoNotDisturbDate| export enum DoNotDisturbType {<br/> TYPE_NONE = 0, // Non-notification DND type<br/> TYPE_ONCE = 1, // One-shot DND at the specified time segment<br/> TYPE_DAILY = 2, // Daily DND at the specified time segment (only the hour and minute specified)<br/> TYPE_CLEARLY = 3, // DND at the specified time segment (the year, month, day, hour, and minute specified)<br/>}| Added| Added the DND time type.|
| Event Notification - notification| function setDoNotDisturbDate(date DoNotDisturbDate, callback: AsyncCallback<void>): void | Added| Added the API for setting the DND time segment.|
| Event Notification - notification| function setDoNotDisturbDate(date DoNotDisturbDate): Promise<void> | Added| Added the API for setting the DND time segment.|
| Event Notification - notification| function getDoNotDisturbDate(callback: AsyncCallback<DoNotDisturbDate>): void | Added| Added the API for obtaining the DND time segment.|
| Event Notification - notification| function getDoNotDisturbDate(): Promise<DoNotDisturbDate> | Added| Added the API for obtaining the DND time segment.|
| Event Notification - notification| function supportDoNotDisturbMode(callback: AsyncCallback<boolean>): void | Added| Added the API for checking whether DND is supported.|
| Event Notification - notification| function supportDoNotDisturbMode(): Promise<boolean> | Added| Added the API for checking whether DND is supported.|
| Event Notification - notification| function cancelGroup(groupName: string, callback: AsyncCallback<void>): void | Added| Added the API for canceling a notification group of the current application.|
| Event Notification - notification| function cancelGroup(groupName: string): Promise<void> | Added| Added the API for canceling a notification group of the current application.|
| Event Notification - notification| function removeGroupByBundle(bundle: BundleOption, groupName: string, callback: AsyncCallback<void>): void | Added| Added the API for removing a notification group of a specified application.|
| Event Notification - notification| function removeGroupByBundle(bundle: BundleOption, groupName: string): Promise<void> | Added| Added the API for removing a notification group of a specified application.|
| Event Notification - DoNotDisturbDate| export enum DoNotDisturbType {<br> TYPE_NONE = 0, // Non-notification DND type<br> TYPE_ONCE = 1, // One-shot DND at the specified time segment<br> TYPE_DAILY = 2, // Daily DND at the specified time segment (only the hour and minute specified)<br> TYPE_CLEARLY = 3, // DND at the specified time segment (the year, month, day, hour, and minute specified)<br>} | Added| Added the DND time type.|
| Event Notification - notification| setDoNotDisturbDate(date DoNotDisturbDate, callback: AsyncCallback\<void>): void | Added| Added the API for setting the DND time segment.|
| Event Notification - notification| setDoNotDisturbDate(date DoNotDisturbDate): Promise\<void> | Added| Added the API for setting the DND time segment.|
| Event Notification - notification| getDoNotDisturbDate(callback: AsyncCallback\<DoNotDisturbDate>): void | Added| Added the API for obtaining the DND time segment.|
| Event Notification - notification| getDoNotDisturbDate(): Promise\<DoNotDisturbDate> | Added| Added the API for obtaining the DND time segment.|
| Event Notification - notification| supportDoNotDisturbMode(callback: AsyncCallback\<boolean>): void | Added| Added the API for checking whether DND is supported.|
| Event Notification - notification| supportDoNotDisturbMode(): Promise\<boolean> | Added| Added the API for checking whether DND is supported.|
| Event Notification - notification| cancelGroup(groupName: string, callback: AsyncCallback\<void>): void | Added | Added the API for canceling a notification group of the current application. |
| Event Notification - notification | cancelGroup(groupName: string): Promise\<void> | Added| Added the API for canceling a notification group of the current application.|
| Event Notification - notification | removeGroupByBundle(bundle: BundleOption, groupName: string, callback: AsyncCallback\<void>): void | Added| Added the API for removing a notification group of a specified application.|
| Event Notification - notification | removeGroupByBundle(bundle: BundleOption, groupName: string): Promise\<void> | Added| Added the API for removing a notification group of a specified application.|
| Event Notification - NotificationSubscriber| onDoNotDisturbDateChange?:(mode: notification.DoNotDisturbDate) => void | Added| Added the API for subscribing to DND setting changes.|
| Event Notification - NotificationRequest| smallIcon?: image.PixelMap | Added| Added the small notification icon.|
| Event Notification - NotificationRequest| largeIcon?: image.PixelMap; | Added| Added the large notification icon.|
| Event Notification - NotificationRequest| groupName?: string; | Added| Added the notification group name.|
| Event Notification - NotificationUserInput| | Added| Added the user input object.|
| Event Notification - NotificationUserInput| | Added| Added the user input object.|
| Event Notification - NotificationUserInput| inputKey: string | Added| Added a key to identify the user input.|
| Event Notification - NotificationActionButton| userInput?: NotificationUserInput | Added| Added the user input object.|
| Event notification - emitter| function on(event: InnerEvent, callback: Callback<EventData>): void | Added| Added the API for subscribing to an event in persistent manner and receiving the event callback.|
| Event notification - emitter| function once(event: InnerEvent, callback: Callback<EventData>): void | Added| Added the API for subscribing to an event in one-shot manner and unsubscribing from it after the event is received via a callback.|
| Event notification - emitter| function off(eventId: number): void | Added| Added the API for unsubscribing from an event.|
| Event notification - emitter| function emit(event: InnerEvent, data?: EventData): void | Added| Added the API for emitting an event to the event queue.|
| Distributed File - statfs| function getFreeBytes(path: string, callback: AsyncCallback<number>): void | Added| Added the API for obtaining the free space (in bytes) of a device using an asynchronous callback.|
| Distributed File - statfs| function getFreeBytes(path: string): Promise<number> | Added| Added the API for obtaining the free space (in bytes) of a device using a promise.|
| Distributed File - statfs| function getTotalBytes(path: string, callback: AsyncCallback<number>): void | Added| Added the API for obtaining the total space (in bytes) of a device using an asynchronous callback.|
| Distributed File - statfs| function getTotalBytes(path: string): Promise<number> | Added| Added the API for obtaining the total space (in bytes) of a device using a promise.|
| Event notification - emitter| on(event: InnerEvent, callback: Callback\<EventData>): void | Added| Added the API for subscribing to an event in persistent manner and receiving the event callback.|
| Event notification - emitter| once(event: InnerEvent, callback: Callback\<EventData>): void | Added| Added the API for subscribing to an event in one-shot manner and unsubscribing from it after the event is received via a callback.|
| Event notification - emitter| off(eventId: number): void | Added| Added the API for unsubscribing from an event.|
| Event notification - emitter| emit(event: InnerEvent, data?: EventData): void | Added| Added the API for emitting an event to the event queue.|
| Distributed File - statfs| getFreeBytes(path: string, callback: AsyncCallback\<number>): void | Added | Added the API for obtaining the free space (in bytes) of a device using an asynchronous callback.|
| Distributed File - statfs| getFreeBytes(path: string): Promise\<number> | Added| Added the API for obtaining the free space (in bytes) of a device using a promise.|
| Distributed File - statfs| getTotalBytes(path: string, callback: AsyncCallback\<number>): void | Added| Added the API for obtaining the total space (in bytes) of a device using an asynchronous callback.|
| Distributed File - statfs| getTotalBytes(path: string): Promise\<number> | Added| Added the API for obtaining the total space (in bytes) of a device using a promise.|
| Account - account.appAccount| createAppAccountManager | Added| Added the API for obtaining an **AppAccountManager** instance.|
| Account - account.appAccount| addAccount(name: string, callback: AsyncCallback<void>): void;<br/>addAccount(name: string, extraInfo: string, callback: AsyncCallback<void>): void;<br/>addAccount(name: string, extraInfo?: string): Promise<void>; | Added| Added the APIs for adding an application account.|
| Account - account.appAccount| deleteAccount(name: string, callback: AsyncCallback<void>): void;<br/>deleteAccount(name: string): Promise<void>; | Added| Added the APIs for deleting an application account.|
| Account - account.appAccount| disableAppAccess(name: string, bundleName: string, callback: AsyncCallback<void>): void;<br/>disableAppAccess(name: string, bundleName: string): Promise<void>; | Added| Added the APIs for disabling an application account from accessing a third-party application with the given bundle name.|
| Account - account.appAccount| enableAppAccess(name: string, bundleName: string, callback: AsyncCallback<void>): void;<br/>enableAppAccess(name: string, bundleName: string): Promise<void>; | Added| Added the APIs for enabling an application account to access a third-party application with the given bundle name.|
| Account - account.appAccount| checkAppAccountSyncEnable(name: string, callback: AsyncCallback<boolean>): void;<br/>checkAppAccountSyncEnable(name: string): Promise<boolean>; | Added| Added the APIs for checking whether an application account allows application data synchronization.|
| Account - account.appAccount| setAccountCredential(name: string, credentialType: string, credential: string,<br/> callback: AsyncCallback<void>): void;<br/>setAccountCredential(name: string, credentialType: string, credential: string): Promise<void>; | Added| Added the APIs for setting a credential for an application account.|
| Account - account.appAccount| setAccountExtraInfo(name: string, extraInfo: string, callback: AsyncCallback<void>): void;<br/>setAccountExtraInfo(name: string, extraInfo: string): Promise<void>; | Added| Added the APIs for setting additional information for an application account.|
| Account - account.appAccount| setAppAccountSyncEnable(name: string, isEnable: boolean, callback: AsyncCallback<void>): void;<br/>setAppAccountSyncEnable(name: string, isEnable: boolean): Promise<void>; | Added| Added the APIs for setting whether to enable application data synchronization for an application account.|
| Account - account.appAccount| setAssociatedData(name: string, key: string, value: string, callback: AsyncCallback<void>): void;<br/>setAssociatedData(name: string, key: string, value: string): Promise<void>; | Added| Added the APIs for setting data to be associated with an application account.|
| Account - account.appAccount| getAllAccessibleAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void;<br/>getAllAccessibleAccounts(): Promise<Array<AppAccountInfo>>; | Added| Added the APIs for obtaining the account information of this application and the information about the third-party application account that has been authorized to the current application.|
| Account - account.appAccount| getAllAccounts(owner: string, callback: AsyncCallback<Array<AppAccountInfo>>): void;<br/>getAllAccounts(owner: string): Promise<Array<AppAccountInfo>>; | Added| Added the APIs for obtaining all account information of this application.|
| Account - account.appAccount| getAccountCredential(name: string, credentialType: string, callback: AsyncCallback<string>): void;<br/>getAccountCredential(name: string, credentialType: string): Promise<string>; | Added| Added the APIs for obtaining the credential of an application account.|
| Account - account.appAccount| getAccountExtraInfo(name: string, callback: AsyncCallback<string>): void;<br/>getAccountExtraInfo(name: string): Promise<string>; | Added| Added the APIs for obtaining additional information of an application account.|
| Account - account.appAccount| getAssociatedData(name: string, key: string, callback: AsyncCallback<string>): void;<br/>getAssociatedData(name: string, key: string): Promise<string>; | Added| Added the APIs for obtaining data associated with an application account.|
| Account - account.appAccount| on(type: 'change', owners: Array<string>, callback: Callback<Array<AppAccountInfo>>): void; | Added| Added the API for subscribing to application account changes.|
| Account - account.appAccount| off(type: 'change', callback?: Callback<void>): void; | Added| Added the API for unsubscribing from application account changes.|
| Account - account.appAccount| addAccount(name: string, callback: AsyncCallback\<void>): void;<br>addAccount(name: string, extraInfo: string, callback: AsyncCallback\<void>): void;<br>addAccount(name: string, extraInfo?: string): Promise\<void>; | Added| Added the APIs for adding an application account.|
| Account - account.appAccount| deleteAccount(name: string, callback: AsyncCallback\<void>): void;<br>deleteAccount(name: string): Promise\<void>; | Added| Added the APIs for deleting an application account.|
| Account - account.appAccount| disableAppAccess(name: string, bundleName: string, callback: AsyncCallback\<void>): void;<br>disableAppAccess(name: string, bundleName: string): Promise\<void>; | Added| Added the APIs for disabling an application account from accessing a third-party application with the given bundle name.|
| Account - account.appAccount| enableAppAccess(name: string, bundleName: string, callback: AsyncCallback\<void>): void;<br>enableAppAccess(name: string, bundleName: string): Promise\<void>; | Added| Added the APIs for enabling an application account to access a third-party application with the given bundle name.|
| Account - account.appAccount| checkAppAccountSyncEnable(name: string, callback: AsyncCallback\<boolean>): void;<br>checkAppAccountSyncEnable(name: string): Promise\<boolean>; | Added| Added the APIs for checking whether an application account allows application data synchronization.|
| Account - account.appAccount| setAccountCredential(name: string, credentialType: string, credential: string,<br> callback: AsyncCallback\<void>): void;<br>setAccountCredential(name: string, credentialType: string, credential: string): Promise\<void>; | Added| Added the APIs for setting a credential for an application account.|
| Account - account.appAccount| setAccountExtraInfo(name: string, extraInfo: string, callback: AsyncCallback\<void>): void;<br>setAccountExtraInfo(name: string, extraInfo: string): Promise\<void>; | Added| Added the APIs for setting additional information for an application account.|
| Account - account.appAccount| setAppAccountSyncEnable(name: string, isEnable: boolean, callback: AsyncCallback\<void>): void;<br>setAppAccountSyncEnable(name: string, isEnable: boolean): Promise\<void>; | Added| Added the APIs for setting whether to enable application data synchronization for an application account.|
| Account - account.appAccount| setAssociatedData(name: string, key: string, value: string, callback: AsyncCallback\<void>): void;<br>setAssociatedData(name: string, key: string, value: string): Promise\<void>; | Added| Added the APIs for setting data to be associated with an application account.|
| Account - account.appAccount| getAllAccessibleAccounts(callback: AsyncCallback\<Array\<AppAccountInfo>>): void;<br>getAllAccessibleAccounts(): Promise\<Array\<AppAccountInfo>>; | Added| Added the APIs for obtaining the account information of this application and the information about the third-party application account that has been authorized to the current application.|
| Account - account.appAccount| getAllAccounts(owner: string, callback: AsyncCallback\<Array\<AppAccountInfo>>): void;<br>getAllAccounts(owner: string): Promise\<Array\<AppAccountInfo>>; | Added| Added the APIs for obtaining all account information of this application.|
| Account - account.appAccount| getAccountCredential(name: string, credentialType: string, callback: AsyncCallback\<string>): void;<br>getAccountCredential(name: string, credentialType: string): Promise\<string>; | Added| Added the APIs for obtaining the credential of an application account.|
| Account - account.appAccount| getAccountExtraInfo(name: string, callback: AsyncCallback\<string>): void;<br>getAccountExtraInfo(name: string): Promise\<string>; | Added| Added the APIs for obtaining additional information of an application account.|
| Account - account.appAccount| getAssociatedData(name: string, key: string, callback: AsyncCallback\<string>): void;<br>getAssociatedData(name: string, key: string): Promise\<string>; | Added| Added the APIs for obtaining data associated with an application account.|
| Account - account.appAccount| on(type: 'change', owners: Array\<string>, callback: Callback\<Array\<AppAccountInfo>>): void; | Added| Added the API for subscribing to application account changes.|
| Account - account.appAccount| off(type: 'change', callback?: Callback\<void>): void; | Added| Added the API for unsubscribing from application account changes.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: AsyncCallback<AccelerometerResponse>,options?: Options): void | Added| Added the API for subscribing to acceleration sensor data changes.|
| Pan-sensor - sensor| on(type:SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION,callback:AsyncCallback<LinearAccelerometerResponse>, options?: Options): void | Added| Added the API for subscribing to data changes of the linear acceleration sensor.|
| Pan-sensor - sensor| on(type:SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED,callback:AsyncCallback<AccelerometerUncalibratedResponse>, options?: Options): void | Added| Added the API for subscribing to data changes of the uncalibrated acceleration sensor.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: AsyncCallback<GravityResponse>,options?: Options): void | Added| Added the API for subscribing to data changes of the gravity sensor.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: AsyncCallback<GyroscopeResponse>, options?: Options): void | Added| Added the API for subscribing to data changes of the gyroscope sensor.|
| Pan-sensor - sensor| on(type:SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED,callback:AsyncCallback<GyroscopeUncalibratedResponse>, options?: Options): void | Added| Added the API for subscribing to data changes of the uncalibrated gyroscope sensor.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: AsyncCallback<SignificantMotionResponse>, options?: Options): void | Added| Added the API for subscribing to data changes of the significant motion sensor.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: AsyncCallback<PedometerDetectResponse>, options?: Options): void | Added| Added the API for subscribing to data changes of the pedometer detection sensor.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: AsyncCallback<PedometerResponse>, options?: Options): void | Added| Added the API for subscribing to data changes of the pedometer sensor.|
| Pan-sensor - sensor| on(type:SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE,callback:AsyncCallback<AmbientTemperatureResponse>, options?: Options): void | Added| Added the API for subscribing to data changes of the ambient temperature sensor.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: AsyncCallback<MagneticFieldResponse>,options?: Options): void | Added| Added the API for subscribing to data changes of the magnetic field sensor.|
| Pan-sensor - sensor| on(type:SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED,callback:AsyncCallback<MagneticFieldUncalibratedResponse>, options: Options): void | Added| Added the API for subscribing to data changes of the uncalibrated magnetic field sensor.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: AsyncCallback<ProximityResponse>,options?: Options): void | Added| Added the API for subscribing to proximity sensor data changes.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: AsyncCallback<HumidityResponse>,options?: Options): void | Added| Added the API for subscribing to humidity sensor data changes.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: AsyncCallback<BarometerResponse>,options?: Options): void | Added| Added the API for subscribing to barometer sensor data changes.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_HALL, callback: AsyncCallback<HallResponse>, options?: Options): void | Added| Added the API for subscribing to data changes of the Hall effect sensor.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: AsyncCallback<LightResponse>, options?: Options): void | Added| Added the API for subscribing to data changes of the ambient light sensor.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: AsyncCallback<OrientationResponse>, options?: Options): void | Added| Added the API for subscribing to orientation sensor data changes.|
| Pan-sensor - sensor| on(type:SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR,callback:AsyncCallback<RotationVectorResponse>,options?: Options): void | Added| Added the API for subscribing to data changes of the rotation vector sensor.|
| Pan-sensor - sensor| on(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: AsyncCallback<WearDetectionResponse>,options?: Options): void | Added| Added the API for subscribing to wear detection data changes.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: AsyncCallback<AccelerometerResponse>): void | Added| Added the API for subscribing to only one data change of the acceleration sensor.|
| Pan-sensor - sensor| once(type:SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION,callback:AsyncCallback<LinearAccelerometerResponse>): void | Added| Added the API for subscribing to only one data change of the linear acceleration sensor.|
| Pan-sensor - sensor| once(type:SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED,callback:AsyncCallback<AccelerometerUncalibratedResponse>): void | Added| Added the API for subscribing to only one data change of the uncalibrated acceleration sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: AsyncCallback<GravityResponse>): void | Added| Added the API for subscribing to only one data change of the gravity sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: AsyncCallback<GyroscopeResponse>): void | Added| Added the API for subscribing to only one data change of the gyroscope sensor.|
| Pan-sensor - sensor| once(type:SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED,callback:AsyncCallback<GyroscopeUncalibratedResponse>, options?: Options): void | Added| Added the API for subscribing to only one data change of the uncalibrated gyroscope sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: AsyncCallback<SignificantMotionResponse>): void | Added| Added the API for subscribing to only one data change of the significant motion sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: AsyncCallback<PedometerDetectResponse>): void | Added| Added the API for subscribing to only one data change of the pedometer detection sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: AsyncCallback<PedometerResponse>): void | Added| Added the API for subscribing to only one data change of the pedometer sensor.|
| Pan-sensor - sensor| once(type:SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE,callback:AsyncCallback<AmbientTemperatureResponse>): void | Added| Added the API for subscribing to only one data change of the ambient temperature sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: AsyncCallback<MagneticFieldResponse>): void | Added| Added the API for subscribing to only one data change of the magnetic field sensor.|
| Pan-sensor - sensor| once(type:SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED,callback:AsyncCallback<MagneticFieldUncalibratedResponse>): void | Added| Added the API for subscribing to only one data change of the uncalibrated magnetic field sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: AsyncCallback<ProximityResponse>): void | Added| Added the API for subscribing to only one data change of the proximity sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: AsyncCallback<HumidityResponse>): void | Added| Added the API for subscribing to only one data change of the humidity sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: AsyncCallback<BarometerResponse>): void | Added| Added the API for subscribing to only one data change of the barometer sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_HALL, callback: AsyncCallback<HallResponse>): void | Added| Added the API for subscribing to only one data change of the Hall effect sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: AsyncCallback<LightResponse>): void | Added| Added the API for subscribing to only one data change of the ambient light sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: AsyncCallback<OrientationResponse>): void | Added| Added the API for subscribing to only one data change of the orientation sensor.|
| Pan-sensor - sensor| once(type:SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR,callback:AsyncCallback<RotationVectorResponse>): void | Added| Added the API for subscribing to only one data change of the rotation vector sensor.|
| Pan-sensor - sensor| once(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: AsyncCallback<WearDetectionResponse>): void | Added| Added the API for subscribing to only one data change of the wear detection sensor.|
| Pan-sensor - sensor| off(type: SensorType, callback?: AsyncCallback<void>): void | Added| Added the API for unsubscribing from sensor data changes.|
| Pan-sensor - sensor| getGeomagneticField(locationOptions: LocationOptions, timeMillis: number, callback: AsyncCallback<GeomagneticResponse>): void </br> getGeomagneticField(locationOptions: LocationOptions, timeMillis: number): Promise<GeomagneticResponse> | Added| Added the APIs for obtaining the geomagnetic field of a geographic location.|
| Pan-sensor - vibrator| vibrate(duration: number): Promise<void></br> vibrate(duration: number, callback?: AsyncCallback<void>): void | Added| Added the APIs for triggering vibration with a specific duration.|
| Pan-sensor - vibrator| vibrate(effectId: EffectId): Promise<void></br> vibrate(effectId: EffectId, callback?: AsyncCallback<void>): void | Added| Added the APIs for triggering vibration with a specific effect.|
| Pan-sensor - vibrator| stop(stopMode: VibratorStopMode): Promise<void></br> stop(stopMode: VibratorStopMode, callback?: AsyncCallback<void>): void | Added| Added the APIs for stopping vibration.|
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: AsyncCallback\<AccelerometerResponse>,options?: Options): void | Added | Added the API for subscribing to acceleration sensor data changes. |
| Pan-sensor - sensor | on(type:SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION,callback:AsyncCallback\<LinearAccelerometerResponse>, options?: Options): void | Added | Added the API for subscribing to data changes of the linear acceleration sensor. |
| Pan-sensor - sensor | on(type:SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED,callback:AsyncCallback\<AccelerometerUncalibratedResponse>, options?: Options): void | Added | Added the API for subscribing to data changes of the uncalibrated acceleration sensor. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: AsyncCallback\<GravityResponse>,options?: Options): void | Added | Added the API for subscribing to data changes of the gravity sensor. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: AsyncCallback\<GyroscopeResponse>, options?: Options): void | Added | Added the API for subscribing to data changes of the gyroscope sensor. |
| Pan-sensor - sensor | on(type:SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED,callback:AsyncCallback\<GyroscopeUncalibratedResponse>, options?: Options): void | Added | Added the API for subscribing to data changes of the uncalibrated gyroscope sensor. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: AsyncCallback\<SignificantMotionResponse>, options?: Options): void | Added | Added the API for subscribing to data changes of the significant motion sensor. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: AsyncCallback\<PedometerDetectResponse>, options?: Options): void | Added | Added the API for subscribing to data changes of the pedometer detection sensor. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: AsyncCallback\<PedometerResponse>, options?: Options): void | Added | Added the API for subscribing to data changes of the pedometer sensor. |
| Pan-sensor - sensor | on(type:SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE,callback:AsyncCallback\<AmbientTemperatureResponse>, options?: Options): void | Added | Added the API for subscribing to data changes of the ambient temperature sensor. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: AsyncCallback\<MagneticFieldResponse>,options?: Options): void | Added | Added the API for subscribing to data changes of the magnetic field sensor. |
| Pan-sensor - sensor | on(type:SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED,callback:AsyncCallback\<MagneticFieldUncalibratedResponse>, options: Options): void | Added | Added the API for subscribing to data changes of the uncalibrated magnetic field sensor. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: AsyncCallback\<ProximityResponse>,options?: Options): void | Added | Added the API for subscribing to proximity sensor data changes. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: AsyncCallback\<HumidityResponse>,options?: Options): void | Added | Added the API for subscribing to humidity sensor data changes. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: AsyncCallback\<BarometerResponse>,options?: Options): void | Added | Added the API for subscribing to barometer sensor data changes. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_HALL, callback: AsyncCallback\<HallResponse>, options?: Options): void | Added | Added the API for subscribing to data changes of the Hall effect sensor. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: AsyncCallback\<LightResponse>, options?: Options): void | Added | Added the API for subscribing to data changes of the ambient light sensor. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: AsyncCallback\<OrientationResponse>, options?: Options): void | Added | Added the API for subscribing to orientation sensor data changes. |
| Pan-sensor - sensor | on(type:SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR,callback:AsyncCallback\<RotationVectorResponse>,options?: Options): void | Added | Added the API for subscribing to data changes of the rotation vector sensor. |
| Pan-sensor - sensor | on(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: AsyncCallback\<WearDetectionResponse>,options?: Options): void | Added | Added the API for subscribing to wear detection data changes. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: AsyncCallback\<AccelerometerResponse>): void | Added | Added the API for subscribing to only one data change of the acceleration sensor. |
| Pan-sensor - sensor | once(type:SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION,callback:AsyncCallback\<LinearAccelerometerResponse>): void | Added | Added the API for subscribing to only one data change of the linear acceleration sensor. |
| Pan-sensor - sensor | once(type:SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED,callback:AsyncCallback\<AccelerometerUncalibratedResponse>): void | Added | Added the API for subscribing to only one data change of the uncalibrated acceleration sensor.|
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: AsyncCallback\<GravityResponse>): void | Added | Added the API for subscribing to only one data change of the gravity sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: AsyncCallback\<GyroscopeResponse>): void | Added | Added the API for subscribing to only one data change of the gyroscope sensor. |
| Pan-sensor - sensor | once(type:SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED,callback:AsyncCallback\<GyroscopeUncalibratedResponse>, options?: Options): void | Added | Added the API for subscribing to only one data change of the uncalibrated gyroscope sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: AsyncCallback\<SignificantMotionResponse>): void | Added | Added the API for subscribing to only one data change of the significant motion sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: AsyncCallback\<PedometerDetectResponse>): void | Added | Added the API for subscribing to only one data change of the pedometer detection sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: AsyncCallback\<PedometerResponse>): void | Added | Added the API for subscribing to only one data change of the pedometer sensor. |
| Pan-sensor - sensor | once(type:SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE,callback:AsyncCallback\<AmbientTemperatureResponse>): void | Added | Added the API for subscribing to only one data change of the ambient temperature sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: AsyncCallback\<MagneticFieldResponse>): void | Added | Added the API for subscribing to only one data change of the magnetic field sensor. |
| Pan-sensor - sensor | once(type:SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED,callback:AsyncCallback\<MagneticFieldUncalibratedResponse>): void | Added | Added the API for subscribing to only one data change of the uncalibrated magnetic field sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: AsyncCallback\<ProximityResponse>): void | Added | Added the API for subscribing to only one data change of the proximity sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: AsyncCallback\<HumidityResponse>): void | Added | Added the API for subscribing to only one data change of the humidity sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: AsyncCallback\<BarometerResponse>): void | Added | Added the API for subscribing to only one data change of the barometer sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_HALL, callback: AsyncCallback\<HallResponse>): void | Added | Added the API for subscribing to only one data change of the Hall effect sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: AsyncCallback\<LightResponse>): void | Added | Added the API for subscribing to only one data change of the ambient light sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: AsyncCallback\<OrientationResponse>): void | Added | Added the API for subscribing to only one data change of the orientation sensor. |
| Pan-sensor - sensor | once(type:SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR,callback:AsyncCallback\<RotationVectorResponse>): void | Added | Added the API for subscribing to only one data change of the rotation vector sensor. |
| Pan-sensor - sensor | once(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: AsyncCallback\<WearDetectionResponse>): void | Added | Added the API for subscribing to only one data change of the wear detection sensor. |
| Pan-sensor - sensor | off(type: SensorType, callback?: AsyncCallback\<void>): void | Added | Added the API for unsubscribing from sensor data changes. |
| Pan-sensor - sensor | getGeomagneticField(locationOptions: LocationOptions, timeMillis: number, callback: AsyncCallback\<GeomagneticResponse>): void <br> getGeomagneticField(locationOptions: LocationOptions, timeMillis: number): Promise\<GeomagneticResponse> | Added | Added the APIs for obtaining the geomagnetic field of a geographic location. |
| Pan-sensor - vibrator| vibrate(duration: number): Promise\<void> <br> vibrate(duration: number, callback?: AsyncCallback\<void>): void | Added | Added the APIs for triggering vibration with a specific duration. |
| Pan-sensor - vibrator| vibrate(effectId: EffectId): Promise\<void> <br> vibrate(effectId: EffectId, callback?: AsyncCallback\<void>): void | Added | Added the APIs for triggering vibration with a specific effect. |