harmony(鸿蒙)JS API Differences

2022-08-09 浏览 (524)

JS API Differences

This document describes the changes of APIs in OpenHarmony 3.1 Beta when compared with OpenHarmony 3.0 LTS.

Standard System API Changes

ModuleAPIChange TypeChange Description
System Application - settingsgetUri(name: string): stringAddedAdded the API for obtaining the URI of a string.
System Application - settingsgetValue(dataAbilityHelper: DataAbilityHelper, name: string, defValue: string): stringAddedAdded the API for obtaining the value of a string in the database.
System Application - settingssetValue(dataAbilityHelper: DataAbilityHelper, name: string, value: string): booleanAddedAdded the API for saving a string name and its value in the database.
Misc Services - systemTimegetCurrentTime(callback: AsyncCallback<number>): voidAddedAdded the API for obtaining the number of milliseconds elapsed since the Unix epoch.
Misc Services - systemTimegetCurrentTime(): Promise<number>AddedAdded the API for obtaining the number of milliseconds elapsed since the Unix epoch.
Misc Services - systemTimegetCurrentTimeNs(callback: AsyncCallback<number>): voidAddedAdded the API for obtaining the number of nanoseconds elapsed since the Unix epoch.
Misc Services - systemTimegetCurrentTimeNs(): Promise<number>AddedAdded the API for obtaining the number of nanoseconds elapsed since the Unix epoch.
Misc Services - systemTimegetRealActiveTime(callback: AsyncCallback<number>): voidAddedAdded the API for obtaining the number of milliseconds elapsed since the system boot, excluding the deep sleep time.
Misc Services - systemTimegetRealActiveTime(): Promise<number>AddedAdded the API for obtaining the number of milliseconds elapsed since the system boot, excluding the deep sleep time.
Misc Services - systemTimegetRealActiveTimeNs(callback: AsyncCallback<number>): voidAddedAdded the API for obtaining the number of nanoseconds elapsed since the system boot, excluding the deep sleep time.
Misc Services - systemTimegetRealActiveTimeNs(): Promise<number>AddedAdded the API for obtaining the number of nanoseconds elapsed since the system boot, excluding the deep sleep time.
Misc Services - systemTimegetRealTime(callback: AsyncCallback<number>): voidAddedAdded the API for obtaining the number of milliseconds elapsed since the system boot, including the deep sleep time.
Misc Services - systemTimegetRealTime(): Promise<number>AddedAdded the API for obtaining the number of milliseconds elapsed since the system boot, including the deep sleep time.
Misc Services - systemTimegetRealTimeNs(callback: AsyncCallback<number>): voidAddedAdded the API for obtaining the number of nanoseconds elapsed since the system boot, including the deep sleep time.
Misc Services - systemTimegetRealTimeNs(): Promise<number>AddedAdded the API for obtaining the number of nanoseconds elapsed since the system boot, including the deep sleep time.
Misc Services - systemTimegetDate(callback: AsyncCallback<Date>): voidAddedAdded the API for obtaining the current time.
Misc Services - systemTimegetDate(): Promise<Date>AddedAdded the API for obtaining the current time.
Misc Services - systemTimegetTimeZone(callback: AsyncCallback<string>): voidAddedAdded the API for obtaining the system time zone.
Misc Services - systemTimegetTimeZone(): Promise<string>AddedAdded the API for obtaining the system time zone.
ArkUI Framework - Universal EventsonAreaChangeAddedAdded the event indicating component area (including the size and position) changes.
ArkUI Framework - Universal AttributesresponseRegionAddedAdded the attribute for touch hotspot settings.
ArkUI Framework - Universal AttributestouchableAddedAdded the attribute that specifies whether a component is touchable.
ArkUI Framework - Universal AttributesstateStyleAddedAdded the attribute that specifies the styles of the pressed and disabled states of a component.
ArkUI Framework - Basic GesturesSwipeGestureAddedAdded the SwipeGesture module.
ArkUI Framework - Basic ComponentsMarqueeAddedAdded the <Marquee> component.
ArkUI Framework - Basic ComponentsPluginComponentAddedAdded the <PluginComponent> component.
ArkUI Framework - Basic ComponentsTextAreaAddedAdded the <TextArea> component.
ArkUI Framework - Basic ComponentsTextInputAddedAdded the <TextInput> component.
ArkUI Framework - Basic ComponentsToggleAddedAdded the <Toggle> component.
ArkUI Framework - Container ComponentsScrollBarAddedAdded the <ScrollBar> component.
ArkUI Framework - Container ComponentsNavigationAddedAdded the <Navigation> component.
ArkUI Framework - Container ComponentsStepperAddedAdded the <Stepper> component.
ArkUI Framework - Container ComponentsStepperItemAddedAdded the <StepperItem> component.
ArkUI Framework - Canvas ComponentsCanvasAddedAdded the <Canvas> component.
ArkUI Framework - Canvas ComponentsLottieAddedAdded the support for the Lottie library.
ArkUI Framework - Global UI MethodsActionSheetAddedAdded the support for the list selection dialog box.
USB Service - USBgetDevices(): Array<Readonly<USBDevice>>AddedAdded the API for obtaining USB devices.
USB Service - USBconnectDevice(device: USBDevice): Readonly<USBDevicePipe>AddedAdded the API for opening a USB device based on the device information returned by getDevices().
USB Service - USBhasRight(deviceName: string): booleanAddedAdded the API for checking whether the caller has the permission to access the USB device.
USB Service - USBrequestRight(deviceName: string): Promise<boolean>AddedAdded the API for requesting the temporary permission for the caller to access the USB device.
USB Service - USBclaimInterface(pipe: USBDevicePipe, iface: USBInterface, force?: boolean): numberAddedAdded the API for claiming a USB interface.
USB Service - USBreleaseInterface(pipe: USBDevicePipe, iface: USBInterface): numberAddedAdded the API for releasing a USB interface.
USB Service - USBsetConfiguration(pipe: USBDevicePipe, config: USBConfig): numberAddedAdded the API for setting USB device configurations.
USB Service - USBsetInterface(pipe: USBDevicePipe, iface: USBInterface): numberAddedAdded the API for setting USB device interfaces.
USB Service - USBgetRawDescriptor(pipe: USBDevicePipe): Uint8ArrayAddedAdded the API for obtaining the raw USB descriptor.
USB Service - USBgetFileDescriptor(pipe: USBDevicePipe): numberAddedAdded the API for obtaining the file descriptor.
USB Service - USBcontrolTransfer(pipe: USBDevicePipe, contrlparam: USBControlParams, timeout?: number): Promise<number>AddedAdded the API for control transfer.
USB Service - USBbulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, timeout?: number): Promise<number>AddedAdded the API for bulk transfer.
USB Service - USBclosePipe(pipe: USBDevicePipe): numberAddedAdded the API for closing the USB device pipe.
Application Framework - bundlecleanBundleCacheFiles(bundleName: string, callback: AsyncCallback<void>): void;
cleanBundleCacheFiles(bundleName: string): Promise<void>;
AddedAdded the APIs for clearing the cache of an application.
Application Framework - bundlesetApplicationEnabled(bundleName: string, isEnable: boolean, callback: AsyncCallback<void>): void;
setApplicationEnabled(bundleName: string, isEnable: boolean): Promise<void>;
AddedAdded the API for setting whether to enable an application.
Application Framework - bundlesetAbilityEnabled(info: AbilityInfo, isEnable: boolean, callback: AsyncCallback<void>): void;
setAbilityEnabled(info: AbilityInfo, isEnable: boolean): Promise<void>;
AddedAdded the API for setting whether to enable an ability.
Application Framework - bundle.innerBundleManagergetLauncherAbilityInfos(bundleName: string, userId: number, callback: AsyncCallback<Array<LauncherAbilityInfo>>) : void;
getLauncherAbilityInfos(bundleName: string, userId: number) : Promise<Array<LauncherAbilityInfo>>;
AddedAdded the API for obtaining the launcher ability information by bundleName.
Application Framework - bundle.innerBundleManageron(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback, callback: AsyncCallback<string>) : void;
on(type:"BundleStatusChange", bundleStatusCallback : BundleStatusCallback): Proimise<string>;
AddedAdded the API for subscribing to bundle status changes.
Application Framework - bundle.innerBundleManageroff(type:"BundleStatusChange", callback: AsyncCallback<string>) : void;
off(type:"BundleStatusChange"): Proimise<string>;
AddedAdded the APIs for unsubscribing from bundle status changes.
Application Framework - bundle.innerBundleManagergetAllLauncherAbilityInfos(userId: number, callback: AsyncCallback<Array<LauncherAbilityInfo>>) : void;
getAllLauncherAbilityInfos(userId: number) : Promise<Array<LauncherAbilityInfo>>;
AddedAdded the APIs for obtaining the application abilities on all launchers by userId.
Application Framework - bundle.innerBundleManagergetShortcutInfos(bundleName :string, callback: AsyncCallback<Array<ShortcutInfo>>) : void;
getShortcutInfos(bundleName : string) : Promise<Array<ShortcutInfo>>;
AddedAdded the API for obtaining the application shortcut information by bundleName.
DSoftBus - rpc.MessageParcelwriteNoException(): voidAdded-
DSoftBus - rpc.MessageParcelreadException(): voidAdded-
DSoftBus - rpc.MessageParcelwriteRemoteObjectArray(objectArray: IRemoteObject[]): booleanAdded-
DSoftBus - rpc.MessageParcelreadSequenceableArray(sequenceableArray Sequenceable[]): voidAdded-
DSoftBus - rpc.MessageParcelreadRemoteObjectArray(objects: IRemoteObject[]): voidAdded-
DSoftBus - rpc.MessageParcelreadRemoteObjectArray(): IRemoteObject[]Added-
DSoftBus - rpc.MessageParcelstatic closeFileDescriptor(fd: number): voidAdded-
DSoftBus - rpc.MessageParcelstatic dupFileDescriptor(fd: number) :numberAdded-
DSoftBus - rpc.MessageParcelcontainFileDescriptors(): booleanAdded-
DSoftBus - rpc.MessageParcelwriteFileDescriptor(fd: number): booleanAdded-
DSoftBus - rpc.MessageParcelreadFileDescriptor(): numberAdded-
DSoftBus - rpc.MessageParcelwriteAshmem(ashmem: Ashmem): booleanAdded-
DSoftBus - rpc.MessageParcelreadAshmem(): AshmemAdded-
DSoftBus - rpc.MessageParcelgetRawDataCapacity(): numberAdded-
DSoftBus - rpc.MessageParcelwriteRawData(rawData: number[], size: number): booleanAdded-
DSoftBus - rpc.MessageParcelreadRawData(size: number): number[]Added-
DSoftBus - rpcinterface SendRequestResult {
errCode: number;
code: number;
data: MessageParcel;
reply: MessageParcel;
}
Added-
DSoftBus - rpc.AshmemPROT_EXEC = 4Added-
DSoftBus - rpc.AshmemPROT_NONE = 0Added-
DSoftBus - rpc.AshmemPROT_READ = 1Added-
DSoftBus - rpc.AshmemPROT_WRITE = 2Added-
DSoftBus - rpc.Ashmemstatic createAshmem(name: string, size: number): AshmemAdded-
DSoftBus - rpc.Ashmemstatic createAshmemFromExisting(ashmem: Ashmem): AshmemAdded-
DSoftBus - rpc.AshmemcloseAshmem(): voidAdded-
DSoftBus - rpc.AshmemunmapAshmem(): voidAdded-
DSoftBus - rpc.AshmemgetAshmemSize(): numberAdded-
DSoftBus - rpc.AshmemmapAshmem(mapType: number): booleanAdded-
DSoftBus - rpc.AshmemmapReadAndWriteAshmem(): booleanAdded-
DSoftBus - rpc.AshmemmapReadOnlyAshmem(): booleanAdded-
DSoftBus - rpc.AshmemsetProtection(protectionType: number): booleanAdded-
DSoftBus - rpc.AshmemwriteToAshmem(buf: number[], size: number, offset: number): booleanAdded-
DSoftBus - rpc.AshmemreadFromAshmem(size: number, offset: number): number[]Added-
DSoftBus - rpc.IRemoteObjectsendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): booleanDeprecatedReplaced by an asynchronous interface, which uses a promise or callback.
DSoftBus - rpc.IRemoteObjectsendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): Promise<SendRequestResult>Added-
DSoftBus - rpc.IRemoteObjectsendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption, callback: AsyncCallback<SendRequestResult>): voidAdded-
DSoftBus - rpc.RemoteProxysendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): booleanDeprecatedReplaced by an asynchronous interface, which uses a promise or callback.
DSoftBus - rpc.RemoteProxysendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): Promise<SendRequestResult>Added-
DSoftBus - rpc.RemoteProxysendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption, callback: AsyncCallback<SendRequestResult>): voidAdded-
DSoftBus - rpc.RemoteObjectsendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): booleanDeprecatedReplaced by an asynchronous interface, which uses a promise or callback.
DSoftBus - rpc.RemoteObjectsendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption): Promise<SendRequestResult>Added-
DSoftBus - rpc.RemoteObjectsendRequest(code: number, data: MessageParcel, reply: MessageParcel, options: MessageOption, callback: AsyncCallback<SendRequestResult>): voidAdded-
DSoftBus - rpc.IRemoteObjectPING_TRANSACTIONDeletedDeleted since it is not implemented in API Version 7. The deletion has no impact on existing applications.
DSoftBus - rpc.IRemoteObjectDUMP_TRANSACTIONDeletedDeleted since it is not implemented in API Version 7. The deletion has no impact on existing applications.
DSoftBus - rpc.IRemoteObjectINTERFACE_TRANSACTIONDeletedDeleted since it is not implemented in API Version 7. The deletion has no impact on existing applications.
DSoftBus - rpc.IRemoteObjectMIN_TRANSACTION_IDDeletedDeleted since it is not implemented in API Version 7. The deletion has no impact on existing applications.
DSoftBus - rpc.IRemoteObjectMAX_TRANSACTION_IDDeletedDeleted since it is not implemented in API Version 7. The deletion has no impact on existing applications.
DSoftBus - rpc.SequenceablehasFileDescriptor(): booleanDeletedDeleted since this API will not be invoked by the RPC framework. The deletion has no impact on existing applications.
DSoftBus - rpc.MessageOptionconstructor(syncFlags?: number, waitTime = TF_WAIT_TIME)Added-
DSoftBus - rpc.MessageOptiongetFlags(): numberAdded-
DSoftBus - rpc.MessageOptionsetFlags(flags: number): voidAdded-
DSoftBus - rpc.MessageOptiongetWaitTime(): numberAdded-
DSoftBus - rpc.MessageOptionsetWaitTime(waitTime: number): voidAdded-
DSoftBus - rpc.MessageOptionMAX_WAIT_TIME = 3000DeletedDeleted since it is not implemented in API Version 7. The deletion has no impact on existing applications.
DSoftBus - rpc.RemoteObjectconstructor(descriptor: string)Added-
DSoftBus - rpc.RemoteObjectqueryLocalInterface(descriptor: string): IRemoteBrokerModifiedCorrected the return type to IRemoteBroker. This change does not affect existing applications.
DSoftBus - rpc.ProxyPING_TRANSACTIONAdded-
DSoftBus - rpc.ProxyDUMP_TRANSACTIONAdded-
DSoftBus - rpc.ProxyINTERFACE_TRANSACTIONAdded-
DSoftBus - rpc.ProxyMIN_TRANSACTION_ID = 0x1Added-
DSoftBus - rpc.ProxyMAX_TRANSACTION_ID = 0x00FFFFFFAdded-
DSoftBus - rpc.ProxyqueryLocalInterface(interface: string): IRemoteBrokerModifiedCorrected the return type to IRemoteBroker. This change does not affect existing applications.
DSoftBus - Wi-FigetLinkedInfo(): Promise<WifiLinkedInfo>;
getLinkedInfo(callback: AsyncCallback<WifiLinkedInfo>): void;
Added-
DSoftBus - Wi-FiisConnected(): boolean;Added-
DSoftBus - Wi-FigetSupportedFeatures(): number;Added-
DSoftBus - Wi-FiisFeatureSupported(featureId: number): boolean;Added-
DSoftBus - Wi-FigetDeviceMacAddress(): string[];Added-
DSoftBus - Wi-FigetIpInfo(): IpInfo;Added-
DSoftBus - Wi-FigetCountryCode(): string;Added-
DSoftBus - Wi-Fireassociate(): boolean;Added-
DSoftBus - Wi-Fireconnect(): boolean;Added-
DSoftBus - Wi-FigetDeviceConfigs(): Array<WifiDeviceConfig>;Added-
DSoftBus - Wi-FiupdateNetwork(config: WifiDeviceConfig): number;Added-
DSoftBus - Wi-FidisableNetwork(netId: number): boolean;Added-
DSoftBus - Wi-FiremoveAllNetwork(): boolean;Added-
DSoftBus - Wi-FiremoveDevice(id: number): boolean;Added-
DSoftBus - Wi-FienableHotspot(): boolean;Added-
DSoftBus - Wi-FidisableHotspot(): boolean;Added-
DSoftBus - Wi-FiisHotspotActive(): boolean;Added-
DSoftBus - Wi-FisetHotspotConfig(config: HotspotConfig): boolean;Added-
DSoftBus - Wi-FigetHotspotConfig(): HotspotConfig;Added-
DSoftBus - Wi-FigetStations(): Array<StationInfo>;Added-
DSoftBus - Wi-Fion(type: "wifiStateChange", callback: Callback<number>): void;Added-
DSoftBus - Wi-Fioff(type: "wifiStateChange", callback?: Callback<number>): void;Added-
DSoftBus - Wi-Fion(type: "wifiConnectionChange", callback: Callback<number>): void;Added-
DSoftBus - Wi-Fioff(type: "wifiConnectionChange", callback?: Callback<number>): void;Added-
DSoftBus - Wi-Fion(type: "wifiScanStateChange", callback: Callback<number>): void;Added-
DSoftBus - Wi-Fioff(type: "wifiScanStateChange", callback?: Callback<number>): void;Added-
DSoftBus - Wi-Fion(type: "wifiRssiChange", callback: Callback<number>): void;Added-
DSoftBus - Wi-Fioff(type: "wifiRssiChange", callback?: Callback<number>): void;Added-
DSoftBus - Wi-Fion(type: "hotspotStateChange", callback: Callback<number>): void;Added-
DSoftBus - Wi-Fioff(type: "hotspotStateChange", callback?: Callback<number>): void;Added-
DSoftBus - Wi-Fion(type: "hotspotStaJoin", callback: Callback<StationInfo>): void;Added-
DSoftBus - Wi-Fioff(type: "hotspotStaJoin", callback?: Callback<StationInfo>): void;Added-
DSoftBus - Wi-Fion(type: "hotspotStaLeave", callback: Callback<StationInfo>): void;Added-
DSoftBus - Wi-Fioff(type: "hotspotStaLeave", callback?: Callback<StationInfo>): void;Added-
Globalization - resourceManagergetRawFile(path: string, callback: AsyncCallback<Uint8Array>);
getRawFile(path: string): Promise<Uint8Array>;
Added-
Globalization - IntlRelativeTimeFormat.constructor();AddedAdded this constructor.
Globalization - IntlRelativeTimeFormat.constructor(locale: string |Array<string>, options?: RelativeTimeFormatInputOptions);AddedAdded this constructor.
Globalization - IntlRelativeTimeFormat.format(value: number, unit: string): string;AddedAdded the API for formatting the relative time.
Globalization - IntlRelativeTimeFormat.formatToParts(value: number, unit: string): Array<object>;AddedAdded the API for formatting the relative time. The result is divided into multiple parts and stored separately.
Globalization - IntlRelativeTimeFormat.formatToParts(value: number, unit: string): Array<object>;AddedAdded the API for formatting the relative time. The result is divided into multiple parts and stored separately.
Globalization - IntlPluralRules.constructor();AddedAdded this constructor.
Globalization - IntlPluralRules.constructor(locale: string |Array<string>, options?: PluralRulesOptions);AddedAdded this constructor.
Globalization - IntlPluralRules.select(n: number): string;AddedAdded the API for checking the singular-plural type of a number.
Globalization - IntlCollator.constructor();AddedAdded this constructor.
Globalization - IntlCollator.constructor(locale: string |Array<string>, options?: CollatorOptions);AddedAdded this constructor.
Globalization - IntlCollator.compare(first: string, second: string): number;AddedAdded the API for comparing two strings.
Globalization - IntlCollator.resolvedOptions(): CollatorOptions;AddedAdded the API for obtaining the attributes of a sorting object.
Globalization - I18NunitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: number, locale: string, style?: string): string;AddedAdded the API for unit conversion.
Globalization - I18Nconstructor(country: string, options?: PhoneNumberFormatOptions);
isValidNumber(number: string): boolean;
format(number: string): string;
AddedAdded the APIs for formatting phone numbers.
Globalization - I18NsetTime(date: Date);
setTime(time: number);
set(year: number, month: number, date:number, hour?: number, minute?: number, second?: number);
setTimeZone(timezone: string);
getTimeZone(): string;
getFirstDayOfWeek(): number;
setFirstDayOfWeek(value: number);
getMinimalDaysInFirstWeek(): number;
setMinimalDaysInFirstWeek(value: number);
get(field: string): number;
getDisplayName(locale: string): string;
isWeekend(date?: Date): boolean;
export getCalendar(locale: string, type?: string): Calendar;
AddedAdded the APIs for the calendar.
Globalization - I18NisRTL(locale: string): boolean;AddedAdded the API for checking whether the localized script for the specified language is displayed from right to left.
Globalization - I18NgetLineInstance(locale: string): BreakIterator;
current(): number;
first(): number;
last(): number;
next(index?: number): number;
previous(): number;
setLineBreakText(text: string): void;
following(offset: number): number;
getLineBreakText(): string;
isBoundary(offset: number): boolean;
AddedAdded the APIs for line feed.
Globalization - I18NgetInstance(locale?:string): IndexUtil;
getIndexList(): Array<string>;
AddedAdded the APIs for obtaining the alphabet index.
Globalization - I18NaddLocale(locale: string);
getIndex(text: string): string;
isDigit(char: string): boolean;
isSpaceChar(char: string): boolean;
isWhitespace(char: string): boolean;
isRTL(char: string): boolean;
isIdeograph(char: string): boolean;
isLetter(char: string): boolean;
isLowerCase(char: string): boolean;
isUpperCase(char: string): boolean;
getType(char: string): string;
AddedAdded the APIs for obtaining character attributes.
Event Notification - DoNotDisturbDatetype: notification.DoNotDisturbTypeAddedAdded the do-not-disturb (DND) time type.
Event Notification - DoNotDisturbDatebegin: DateAddedAdded the DND start time setting.
Event Notification - DoNotDisturbDateend: DateAddedAdded the DND end time setting.
Event Notification - DoNotDisturbDateexport enum DoNotDisturbType {
TYPE_NONE = 0, // Non-notification DND type
TYPE_ONCE = 1, // One-shot DND at the specified time segment
TYPE_DAILY = 2, // Daily DND at the specified time segment (only the hour and minute specified)
TYPE_CLEARLY = 3, // DND at the specified time segment (the year, month, day, hour, and minute specified)
}
AddedAdded the DND time type.
Event Notification - notificationsetDoNotDisturbDate(date DoNotDisturbDate, callback: AsyncCallback<void>): voidAddedAdded the API for setting the DND time segment.
Event Notification - notificationsetDoNotDisturbDate(date DoNotDisturbDate): Promise<void>AddedAdded the API for setting the DND time segment.
Event Notification - notificationgetDoNotDisturbDate(callback: AsyncCallback<DoNotDisturbDate>): voidAddedAdded the API for obtaining the DND time segment.
Event Notification - notificationgetDoNotDisturbDate(): Promise<DoNotDisturbDate>AddedAdded the API for obtaining the DND time segment.
Event Notification - notificationsupportDoNotDisturbMode(callback: AsyncCallback<boolean>): voidAddedAdded the API for checking whether DND is supported.
Event Notification - notificationsupportDoNotDisturbMode(): Promise<boolean>AddedAdded the API for checking whether DND is supported.
Event Notification - notificationcancelGroup(groupName: string, callback: AsyncCallback<void>): voidAddedAdded the API for canceling a notification group of the current application.
Event Notification - notificationcancelGroup(groupName: string): Promise<void>AddedAdded the API for canceling a notification group of the current application.
Event Notification - notificationremoveGroupByBundle(bundle: BundleOption, groupName: string, callback: AsyncCallback<void>): voidAddedAdded the API for removing a notification group of a specified application.
Event Notification - notificationremoveGroupByBundle(bundle: BundleOption, groupName: string): Promise<void>AddedAdded the API for removing a notification group of a specified application.
Event Notification - NotificationSubscriberonDoNotDisturbDateChange?:(mode: notification.DoNotDisturbDate) => voidAddedAdded the API for subscribing to DND setting changes.
Event Notification - NotificationRequestsmallIcon?: image.PixelMapAddedAdded the small notification icon.
Event Notification - NotificationRequestlargeIcon?: image.PixelMap;AddedAdded the large notification icon.
Event Notification - NotificationRequestgroupName?: string;AddedAdded the notification group name.
Event Notification - NotificationUserInputAddedAdded the user input object.
Event Notification - NotificationUserInputinputKey: stringAddedAdded a key to identify the user input.
Event Notification - NotificationActionButtonuserInput?: NotificationUserInputAddedAdded the user input object.
Event notification - emitteron(event: InnerEvent, callback: Callback<EventData>): voidAddedAdded the API for subscribing to an event in persistent manner and receiving the event callback.
Event notification - emitteronce(event: InnerEvent, callback: Callback<EventData>): voidAddedAdded 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 - emitteroff(eventId: number): voidAddedAdded the API for unsubscribing from an event.
Event notification - emitteremit(event: InnerEvent, data?: EventData): voidAddedAdded the API for emitting an event to the event queue.
Distributed File - statfsgetFreeBytes(path: string, callback: AsyncCallback<number>): voidAddedAdded the API for obtaining the free space (in bytes) of a device using an asynchronous callback.
Distributed File - statfsgetFreeBytes(path: string): Promise<number>AddedAdded the API for obtaining the free space (in bytes) of a device using a promise.
Distributed File - statfsgetTotalBytes(path: string, callback: AsyncCallback<number>): voidAddedAdded the API for obtaining the total space (in bytes) of a device using an asynchronous callback.
Distributed File - statfsgetTotalBytes(path: string): Promise<number>AddedAdded the API for obtaining the total space (in bytes) of a device using a promise.
Distributed Scheduler - featureAbilitycontinueAbility(options: ContinueAbilityOptions, callback: AsyncCallback<void>): void;
continueAbility(options: ContinueAbilityOptions): Promise<void>;
Added-
Multi-language Runtime - URIconstructor(uri: string);Added
Multi-language Runtime - URItoString(): stringAdded
Multi-language Runtime - URIequals(other: URI): boolean;Added
Multi-language Runtime - URIcheckIsAbsolute(): boolean;Added
Multi-language Runtime - URInormalize(): URI;Added
Multi-language Runtime - URIscheme: string;Added
Multi-language Runtime - URIuserinfo: string;Added
Multi-language Runtime - URIhost: string;Added
Multi-language Runtime - URIport: string;Added
Multi-language Runtime - URIpath: string;Added
Multi-language Runtime - URIquery: string;Added
Multi-language Runtime - URIquery: string;Added
Multi-language Runtime - URIauthority: string;Added
Multi-language Runtime - URIssp: string;Added
Multi-language Runtime - RationalNumberconstructor(numerator: number, denominator: number);Added
Multi-language Runtime - RationalNumberstatic createRationalFromString(rationalString: string): RationalNumber;Added
Multi-language Runtime - RationalNumbercompareTo(another :RationalNumber): number;Added
Multi-language Runtime - RationalNumberequals(obj: Object): boolean;Added
Multi-language Runtime - RationalNumbervalueOf(): number;Added
Multi-language Runtime - RationalNumberstatic getCommonDivisor(number1: number, number2: number): number;Added
Multi-language Runtime - RationalNumbergetDenominator(): number;Added
Multi-language Runtime - RationalNumbergetNumerator(): number;Added
Multi-language Runtime - RationalNumberisFinite() : boolean;Added
Multi-language Runtime - RationalNumberisNaN(): boolean;Added
Multi-language Runtime - RationalNumberisZero(): boolean;Added
Multi-language Runtime - RationalNumbertoString(): string;Added
Multi-language Runtime - LruBufferconstructor(capacity?:number);Added
Multi-language Runtime - LruBufferupdateCapacity(newCapacity: number):voidAdded
Multi-language Runtime - LruBuffertoString():stringAdded
Multi-language Runtime - LruBufferlength:numberAdded
Multi-language Runtime - LruBuffergetCapacity(): number;Added
Multi-language Runtime - LruBufferclear(): void;Added
Multi-language Runtime - LruBuffergetCreateCount(): number;Added
Multi-language Runtime - LruBuffergetMissCount(): number;Added
Multi-language Runtime - LruBuffergetRemovalCount(): number;Added
Multi-language Runtime - LruBuffergetMatchCount(): number;Added
Multi-language Runtime - LruBuffergetPutCount(): number;Added
Multi-language Runtime - LruBufferisEmpty(): boolean;Added
Multi-language Runtime - LruBufferget(key: K): V |undefined;Added
Multi-language Runtime - LruBufferput(key: K, value: V): V;Added
Multi-language Runtime - LruBuffervalues(): V[];Added
Multi-language Runtime - LruBufferkeys(): K[];Added
Multi-language Runtime - LruBufferremove(key: K): V |undefined;Added
Multi-language Runtime - LruBufferafterRemoval(isEvict: boolean, key: K, value: V, newValue: V): void;Added
Multi-language Runtime - LruBuffercontains(key: K): boolean;Added
Multi-language Runtime - LruBuffercreateDefault(key: K): V;Added
Multi-language Runtime - LruBufferentries(): IterableIterator<[K, V]>;Added
Multi-language Runtime - LruBuffer[Symbol.iterator](): IterableIterator<[K, V]>;Added
Multi-language Runtime - Scopeconstructor(lowerObj: ScopeType, upperObj: ScopeType);Added
Multi-language Runtime - ScopetoString(): string;Added
Multi-language Runtime - Scopeintersect(range: Scope): Scope;Added
Multi-language Runtime - Scopeintersect(lowerObj: ScopeType, upperObj: ScopeType): Scope;Added
Multi-language Runtime - ScopegetUpper(): ScopeType;Added
Multi-language Runtime - ScopegetLower(): ScopeType;Added
Multi-language Runtime - Scopeexpand(lowerObj: ScopeType, upperObj: ScopeType): Scope;Added
Multi-language Runtime - Scopeexpand(range: Scope): Scope;Added
Multi-language Runtime - Scopeexpand(value: ScopeType): Scope;Added
Multi-language Runtime - Scopecontains(value: ScopeType): boolean;Added
Multi-language Runtime - Scopecontains(range: Scope): boolean;Added
Multi-language Runtime - Scopeclamp(value: ScopeType): ScopeType;Added
Multi-language Runtime - Base64constructor();Added
Multi-language Runtime - Base64encodeSync(src: Uint8Array): Uint8Array;Added
Multi-language Runtime - Base64encodeToStringSync(src: Uint8Array): string;Added
Multi-language Runtime - Base64decodeSync(src: Uint8Array |string): Uint8Array;Added
Multi-language Runtime - Base64encode(src: Uint8Array): Promise<Uint8Array>;Added
Multi-language Runtime - Base64encodeToString(src: Uint8Array): Promise<string>;Added
Multi-language Runtime - Base64decode(src: Uint8Array |string): Promise<Uint8Array>;Added
Multi-language Runtime - typesconstructor();Added
Multi-language Runtime - typesisAnyArrayBuffer(value: Object): boolean;Added
Multi-language Runtime - typesisArrayBufferView(value: Object): boolean;Added
Multi-language Runtime - typesisArgumentsObject(value: Object): boolean;Added
Multi-language Runtime - typesisArrayBuffer(value: Object): boolean;Added
Multi-language Runtime - typesisAsyncFunction(value: Object): boolean;Added
Multi-language Runtime - typesisBigInt64Array(value: Object): boolean;Added
Multi-language Runtime - typesisBigUint64Array(value: Object): boolean;Added
Multi-language Runtime - typesisBooleanObject(value: Object): boolean;Added
Multi-language Runtime - typesisBoxedPrimitive(value: Object): boolean;Added
Multi-language Runtime - typesisDataView(value: Object): boolean;Added
Multi-language Runtime - typesisDate(value: Object): boolean;Added
Multi-language Runtime - typesisExternal(value: Object): boolean;Added
Multi-language Runtime - typesisFloat32Array(value: Object): boolean;Added
Multi-language Runtime - typesisFloat64Array(value: Object): boolean;Added
Multi-language Runtime - typesisGeneratorFunction(value: Object): boolean;Added
Multi-language Runtime - typesisGeneratorObject(value: Object): boolean;Added
Multi-language Runtime - typesisInt8Array(value: Object): boolean;Added
Multi-language Runtime - typesisInt16Array(value: Object): boolean;Added
Multi-language Runtime - typesisInt32Array(value: Object): boolean;Added
Multi-language Runtime - typesisMap(value: Object): boolean;Added
Multi-language Runtime - typesisMapIterator(value: Object): boolean;Added
Multi-language Runtime - typesisModuleNamespaceObject(value: Object): boolean;Added
Multi-language Runtime - typesisNativeError(value: Object): boolean;Added
Multi-language Runtime - typesisNumberObject(value: Object): boolean;Added
Multi-language Runtime - typesisPromise(value: Object): boolean;Added
Multi-language Runtime - typesisProxy(value: Object): boolean;Added
Multi-language Runtime - typesisRegExp(value: Object): boolean;Added
Multi-language Runtime - typesisSet(value: Object): boolean;Added
Multi-language Runtime - typesisSetIterator(value: Object): boolean;Added
Multi-language Runtime - typesisSharedArrayBuffer(value: Object): boolean;Added
Multi-language Runtime - typesisStringObject(value: Object): boolean;Added
Multi-language Runtime - typesisSymbolObject(value: Object): boolean;Added
Multi-language Runtime - typesisTypedArray(value: Object): boolean;Added
Multi-language Runtime - typesisUint8Array(value: Object): boolean;Added
Multi-language Runtime - typesisUint8ClampedArray(value: Object): boolean;Added
Multi-language Runtime - typesisUint16Array(value: Object): boolean;Added
Multi-language Runtime - typesisUint32Array(value: Object): boolean;Added
Multi-language Runtime - typesisWeakMap(value: Object): boolean;Added
Multi-language Runtime - typesisWeakSet(value: Object): boolean;Added
Multi-language Runtime - processconst tid: number;Added
Multi-language Runtime - processisIsolatedProcess(): boolean;Added
Multi-language Runtime - processisAppUid(v: number): boolean;Added
Multi-language Runtime - processis64Bit(): boolean;Added
Multi-language Runtime - processgetUidForName(v: string): number;Added
Multi-language Runtime - processgetThreadPriority(v: number): number;Added
Multi-language Runtime - processgetStartRealtime(): number;Added
Multi-language Runtime - processgetAvailableCores(): number[];Added
Multi-language Runtime - processgetPastCpuTime(): number;Added
Multi-language Runtime - processgetSystemConfig(name: number): number;Added
Multi-language Runtime - processgetEnvironmentVar(name: string): string;Added
Multi-language Runtime - ConvertOptionstrim: boolean;Added
Multi-language Runtime - ConvertOptionsignoreDeclaration?: boolean;Added
Multi-language Runtime - ConvertOptionsignoreInstruction?: boolean;Added
Multi-language Runtime - ConvertOptionsignoreAttributes?: boolean;Added
Multi-language Runtime - ConvertOptionsignoreComment?: boolean;Added
Multi-language Runtime - ConvertOptionsignoreCdata?: boolean;Added
Multi-language Runtime - ConvertOptionsignoreDoctype?: boolean;Added
Multi-language Runtime - ConvertOptionsignoreText?: boolean;Added
Multi-language Runtime - ConvertOptionsdeclarationKey: string;Added
Multi-language Runtime - ConvertOptionsinstructionKey: string;Added
Multi-language Runtime - ConvertOptionsattributesKey: string;Added
Multi-language Runtime - ConvertOptionstextKey: string;Added
Multi-language Runtime - ConvertOptionscdataKey: string;Added
Multi-language Runtime - ConvertOptionsdoctypeKey: string;Added
Multi-language Runtime - ConvertOptionscommentKey: string;Added
Multi-language Runtime - ConvertOptionsparentKey: string;Added
Multi-language Runtime - ConvertOptionstypeKey: string;Added
Multi-language Runtime - ConvertOptionsnameKey: string;Added
Multi-language Runtime - ConvertOptionselementsKey: string;Added
Multi-language Runtime - ConvertXMLconvert(xml: string, options?: ConvertOptions) : Object;Added
Multi-language Runtime - XmlSerializerconstructor(buffer: ArrayBuffer |DataView, encoding?: string);Added
Multi-language Runtime - XmlSerializersetAttributes(name: string, value: string): void;Added
Multi-language Runtime - XmlSerializeraddEmptyElement(name: string): void;Added
Multi-language Runtime - XmlSerializersetDeclaration(): void;Added
Multi-language Runtime - XmlSerializerstartElement(name: string): void;Added
Multi-language Runtime - XmlSerializerendElement(): void;Added
Multi-language Runtime - XmlSerializersetNamespace(prefix: string, namespace: string): void;Added
Multi-language Runtime - XmlSerializersetCommnet(text: string): void;Added
Multi-language Runtime - XmlSerializersetCData(text: string): void;Added
Multi-language Runtime - XmlSerializersetText(text: string): void;Added
Multi-language Runtime - XmlSerializersetDocType(text: string): void;Added
Multi-language Runtime -ParseOptionssupportDoctype?: boolean;Added
Multi-language Runtime -ParseOptionsignoreNameSpace?: boolean;Added
Multi-language Runtime -ParseOptionstagValueCallbackFunction?: (name: string, value: string) => boolean;Added
Multi-language Runtime -ParseOptionsattributeValueCallbackFunction?: (name: string, value: string) => boolean;Added
Multi-language Runtime -ParseOptionstokenValueCallbackFunction?: (eventType: EventType, value: ParseInfo) => boolean;Added
Account - account.appAccountcreateAppAccountManagerAddedAdded the API for obtaining an AppAccountManager instance.
Account - account.appAccountaddAccount(name: string, callback: AsyncCallback<void>): void;
addAccount(name: string, extraInfo: string, callback: AsyncCallback<void>): void;
addAccount(name: string, extraInfo?: string): Promise<void>;
AddedAdded the APIs for adding an application account.
Account - account.appAccountdeleteAccount(name: string, callback: AsyncCallback<void>): void;
deleteAccount(name: string): Promise<void>;
AddedAdded the APIs for deleting an application account.
Account - account.appAccountdisableAppAccess(name: string, bundleName: string, callback: AsyncCallback<void>): void;
disableAppAccess(name: string, bundleName: string): Promise<void>;
AddedAdded the APIs for disabling an application account from accessing a third-party application with the given bundle name.
Account - account.appAccountenableAppAccess(name: string, bundleName: string, callback: AsyncCallback<void>): void;
enableAppAccess(name: string, bundleName: string): Promise<void>;
AddedAdded the APIs for enabling an application account to access a third-party application with the given bundle name.
Account - account.appAccountcheckAppAccountSyncEnable(name: string, callback: AsyncCallback<boolean>): void;
checkAppAccountSyncEnable(name: string): Promise<boolean>;
AddedAdded the APIs for checking whether an application account allows application data synchronization.
Account - account.appAccountsetAccountCredential(name: string, credentialType: string, credential: string,
callback: AsyncCallback<void>): void;
setAccountCredential(name: string, credentialType: string, credential: string): Promise<void>;
AddedAdded the APIs for setting a credential for an application account.
Account - account.appAccountsetAccountExtraInfo(name: string, extraInfo: string, callback: AsyncCallback<void>): void;
setAccountExtraInfo(name: string, extraInfo: string): Promise<void>;
AddedAdded the APIs for setting additional information for an application account.
Account - account.appAccountsetAppAccountSyncEnable(name: string, isEnable: boolean, callback: AsyncCallback<void>): void;
setAppAccountSyncEnable(name: string, isEnable: boolean): Promise<void>;
AddedAdded the APIs for setting whether to enable application data synchronization for an application account.
Account - account.appAccountsetAssociatedData(name: string, key: string, value: string, callback: AsyncCallback<void>): void;
setAssociatedData(name: string, key: string, value: string): Promise<void>;
AddedAdded the APIs for setting data to be associated with an application account.
Account - account.appAccountgetAllAccessibleAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void;
getAllAccessibleAccounts(): Promise<Array<AppAccountInfo>>;
AddedAdded 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.appAccountgetAllAccounts(owner: string, callback: AsyncCallback<Array<AppAccountInfo>>): void;
getAllAccounts(owner: string): Promise<Array<AppAccountInfo>>;
AddedAdded the APIs for obtaining all account information of this application.
Account - account.appAccountgetAccountCredential(name: string, credentialType: string, callback: AsyncCallback<string>): void;
getAccountCredential(name: string, credentialType: string): Promise<string>;
AddedAdded the APIs for obtaining the credential of an application account.
Account - account.appAccountgetAccountExtraInfo(name: string, callback: AsyncCallback<string>): void;
getAccountExtraInfo(name: string): Promise<string>;
AddedAdded the APIs for obtaining additional information of an application account.
Account - account.appAccountgetAssociatedData(name: string, key: string, callback: AsyncCallback<string>): void;
getAssociatedData(name: string, key: string): Promise<string>;
AddedAdded the APIs for obtaining data associated with an application account.
Account - account.appAccounton(type: 'change', owners: Array<string>, callback: Callback<Array<AppAccountInfo>>): void;AddedAdded the API for subscribing to application account changes.
Account - account.appAccountoff(type: 'change', callback?: Callback<void>): void;AddedAdded the API for unsubscribing from application account changes.
Account - account.appAccountinterface AppAccountInfoAddedAdded the AppAccountInfo interface.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: AsyncCallback<AccelerometerResponse>,options?: Options): voidAddedAdded the API for subscribing to acceleration sensor data changes.
Pan-sensor - sensoron(type:SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION,callback:AsyncCallback<LinearAccelerometerResponse>, options?: Options): voidAddedAdded the API for subscribing to data changes of the linear acceleration sensor.
Pan-sensor - sensoron(type:SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED,callback:AsyncCallback<AccelerometerUncalibratedResponse>, options?: Options): voidAddedAdded the API for subscribing to data changes of the uncalibrated acceleration sensor.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: AsyncCallback<GravityResponse>,options?: Options): voidAddedAdded the API for subscribing to data changes of the gravity sensor.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: AsyncCallback<GyroscopeResponse>, options?: Options): voidAddedAdded the API for subscribing to data changes of the gyroscope sensor.
Pan-sensor - sensoron(type:SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED,callback:AsyncCallback<GyroscopeUncalibratedResponse>, options?: Options): voidAddedAdded the API for subscribing to data changes of the uncalibrated gyroscope sensor.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: AsyncCallback<SignificantMotionResponse>, options?: Options): voidAddedAdded the API for subscribing to data changes of the significant motion sensor.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: AsyncCallback<PedometerDetectResponse>, options?: Options): voidAddedAdded the API for subscribing to data changes of the pedometer detection sensor.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: AsyncCallback<PedometerResponse>, options?: Options): voidAddedAdded the API for subscribing to data changes of the pedometer sensor.
Pan-sensor - sensoron(type:SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE,callback:AsyncCallback<AmbientTemperatureResponse>, options?: Options): voidAddedAdded the API for subscribing to data changes of the ambient temperature sensor.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: AsyncCallback<MagneticFieldResponse>,options?: Options): voidAddedAdded the API for subscribing to data changes of the magnetic field sensor.
Pan-sensor - sensoron(type:SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED,callback:AsyncCallback<MagneticFieldUncalibratedResponse>, options: Options): voidAddedAdded the API for subscribing to data changes of the uncalibrated magnetic field sensor.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: AsyncCallback<ProximityResponse>,options?: Options): voidAddedAdded the API for subscribing to proximity sensor data changes.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: AsyncCallback<HumidityResponse>,options?: Options): voidAddedAdded the API for subscribing to humidity sensor data changes.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: AsyncCallback<BarometerResponse>,options?: Options): voidAddedAdded the API for subscribing to barometer sensor data changes.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_HALL, callback: AsyncCallback<HallResponse>, options?: Options): voidAddedAdded the API for subscribing to data changes of the Hall effect sensor.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: AsyncCallback<LightResponse>, options?: Options): voidAddedAdded the API for subscribing to data changes of the ambient light sensor.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: AsyncCallback<OrientationResponse>, options?: Options): voidAddedAdded the API for subscribing to orientation sensor data changes.
Pan-sensor - sensoron(type:SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR,callback:AsyncCallback<RotationVectorResponse>,options?: Options): voidAddedAdded the API for subscribing to data changes of the rotation vector sensor.
Pan-sensor - sensoron(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: AsyncCallback<WearDetectionResponse>,options?: Options): voidAddedAdded the API for subscribing to wear detection data changes.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_ACCELEROMETER, callback: AsyncCallback<AccelerometerResponse>): voidAddedAdded the API for subscribing to only one data change of the acceleration sensor.
Pan-sensor - sensoronce(type:SensorType.SENSOR_TYPE_ID_LINEAR_ACCELERATION,callback:AsyncCallback<LinearAccelerometerResponse>): voidAddedAdded the API for subscribing to only one data change of the linear acceleration sensor.
Pan-sensor - sensoronce(type:SensorType.SENSOR_TYPE_ID_ACCELEROMETER_UNCALIBRATED,callback:AsyncCallback<AccelerometerUncalibratedResponse>): voidAddedAdded the API for subscribing to only one data change of the uncalibrated acceleration sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_GRAVITY, callback: AsyncCallback<GravityResponse>): voidAddedAdded the API for subscribing to only one data change of the gravity sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_GYROSCOPE, callback: AsyncCallback<GyroscopeResponse>): voidAddedAdded the API for subscribing to only one data change of the gyroscope sensor.
Pan-sensor - sensoronce(type:SensorType.SENSOR_TYPE_ID_GYROSCOPE_UNCALIBRATED,callback:AsyncCallback<GyroscopeUncalibratedResponse>, options?: Options): voidAddedAdded the API for subscribing to only one data change of the uncalibrated gyroscope sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_SIGNIFICANT_MOTION, callback: AsyncCallback<SignificantMotionResponse>): voidAddedAdded the API for subscribing to only one data change of the significant motion sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_PEDOMETER_DETECTION, callback: AsyncCallback<PedometerDetectResponse>): voidAddedAdded the API for subscribing to only one data change of the pedometer detection sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_PEDOMETER, callback: AsyncCallback<PedometerResponse>): voidAddedAdded the API for subscribing to only one data change of the pedometer sensor.
Pan-sensor - sensoronce(type:SensorType.SENSOR_TYPE_ID_AMBIENT_TEMPERATURE,callback:AsyncCallback<AmbientTemperatureResponse>): voidAddedAdded the API for subscribing to only one data change of the ambient temperature sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD, callback: AsyncCallback<MagneticFieldResponse>): voidAddedAdded the API for subscribing to only one data change of the magnetic field sensor.
Pan-sensor - sensoronce(type:SensorType.SENSOR_TYPE_ID_MAGNETIC_FIELD_UNCALIBRATED,callback:AsyncCallback<MagneticFieldUncalibratedResponse>): voidAddedAdded the API for subscribing to only one data change of the uncalibrated magnetic field sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_PROXIMITY, callback: AsyncCallback<ProximityResponse>): voidAddedAdded the API for subscribing to only one data change of the proximity sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_HUMIDITY, callback: AsyncCallback<HumidityResponse>): voidAddedAdded the API for subscribing to only one data change of the humidity sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_BAROMETER, callback: AsyncCallback<BarometerResponse>): voidAddedAdded the API for subscribing to only one data change of the barometer sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_HALL, callback: AsyncCallback<HallResponse>): voidAddedAdded the API for subscribing to only one data change of the Hall effect sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_AMBIENT_LIGHT, callback: AsyncCallback<LightResponse>): voidAddedAdded the API for subscribing to only one data change of the ambient light sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_ORIENTATION, callback: AsyncCallback<OrientationResponse>): voidAddedAdded the API for subscribing to only one data change of the orientation sensor.
Pan-sensor - sensoronce(type:SensorType.SENSOR_TYPE_ID_ROTATION_VECTOR,callback:AsyncCallback<RotationVectorResponse>): voidAddedAdded the API for subscribing to only one data change of the rotation vector sensor.
Pan-sensor - sensoronce(type: SensorType.SENSOR_TYPE_ID_WEAR_DETECTION, callback: AsyncCallback<WearDetectionResponse>): voidAddedAdded the API for subscribing to only one data change of the wear detection sensor.
Pan-sensor - sensoroff(type: SensorType, callback?: AsyncCallback<void>): voidAddedAdded the API for unsubscribing from sensor data changes.
Pan-sensor - sensorgetGeomagneticField(locationOptions: LocationOptions, timeMillis: number, callback: AsyncCallback<GeomagneticResponse>): void
getGeomagneticField(locationOptions: LocationOptions, timeMillis: number): Promise<GeomagneticResponse>
AddedAdded the APIs for obtaining the geomagnetic field of a geographic location.
Pan-sensor - vibratorvibrate(duration: number): Promise<void>
vibrate(duration: number, callback?: AsyncCallback<void>): void
AddedAdded the APIs for triggering vibration with a specific duration.
Pan-sensor - vibratorvibrate(effectId: EffectId): Promise<void>
vibrate(effectId: EffectId, callback?: AsyncCallback<void>): void
AddedAdded the APIs for triggering vibration with a specific effect.
Pan-sensor - vibratorstop(stopMode: VibratorStopMode): Promise<void>
stop(stopMode: VibratorStopMode, callback?: AsyncCallback<void>): void
AddedAdded the APIs for stopping vibration.

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Changelog

harmony(鸿蒙)Native API Differences

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/8e591181b1ca4ffbb451955c5d48a837