harmony(鸿蒙)JS API Changes of the Communication Subsystem

2022-10-28 浏览 (711)

JS API Changes of the Communication Subsystem

The table below lists the APIs changes of the communication subsystem in OpenHarmony 3.2 Beta2 over OpenHarmony 3.2 Beta1.

API Changes

ModuleClassMethod/Attribute/Enumeration/ConstantChange Type
nfctechNdefFormatableTagformatReadOnly(message: NdefMessage): Promise<number>;
formatReadOnly(message: NdefMessage, callback: AsyncCallback<number>): void;
Added
nfctechNdefFormatableTagformat(message: NdefMessage): Promise<number>;
format(message: NdefMessage, callback: AsyncCallback<number>): void;
Added
nfctechMifareUltralightTaggetType(): MifareUltralightType;Added
nfctechMifareUltralightTagwriteSinglePages(pageIndex: number, data: string): Promise<number>;
writeSinglePages(pageIndex: number, data: string, callback: AsyncCallback<number>): void;
Added
nfctechMifareUltralightTagreadMultiplePages(pageIndex: number): Promise<string>;
readMultiplePages(pageIndex: number, callback: AsyncCallback<string>): void;
Added
nfctechMifareUltralightTypeTYPE_ULTRALIGHT_C = 2Added
nfctechMifareUltralightTypeTYPE_ULTRALIGHT = 1Added
nfctechMifareUltralightTypeTYPE_UNKOWN = -1Added
nfctechMifareClassicTaggetSectorIndex(blockIndex: number): number;Added
nfctechMifareClassicTaggetBlockIndex(sectorIndex: number): number;Added
nfctechMifareClassicTagisEmulatedTag(): boolean;Added
nfctechMifareClassicTaggetTagSize(): number;Added
nfctechMifareClassicTaggetType(): MifareClassicType;Added
nfctechMifareClassicTaggetBlockCountInSector(sectorIndex: number): number;Added
nfctechMifareClassicTaggetSectorCount(): number;Added
nfctechMifareClassicTagrestoreFromBlock(blockIndex: number): Promise<number>;
restoreFromBlock(blockIndex: number, callback: AsyncCallback<number>): void;
Added
nfctechMifareClassicTagtransferToBlock(blockIndex: number): Promise<number>;
transferToBlock(blockIndex: number, callback: AsyncCallback<number>): void;
Added
nfctechMifareClassicTagdecrementBlock(blockIndex: number, value: number): Promise<number>;
decrementBlock(blockIndex: number, value: number, callback: AsyncCallback<number>): void;
Added
nfctechMifareClassicTagincrementBlock(blockIndex: number, value: number): Promise<number>;
incrementBlock(blockIndex: number, value: number, callback: AsyncCallback<number>): void;
Added
nfctechMifareClassicTagwriteSingleBlock(blockIndex: number, data: string): Promise<number>;
writeSingleBlock(blockIndex: number, data: string, callback: AsyncCallback<number>): void;
Added
nfctechMifareClassicTagreadSingleBlock(blockIndex: number): Promise<string>;
readSingleBlock(blockIndex: number, callback: AsyncCallback<string>): void;
Added
nfctechMifareClassicTagauthenticateSector(sectorIndex: number, key: number[], isKeyA: boolean): Promise<boolean>;
authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean, callback: AsyncCallback<boolean>): void;
Added
nfctechMifareTagSizeMC_SIZE_4K = 4096Added
nfctechMifareTagSizeMC_SIZE_2K = 2048Added
nfctechMifareTagSizeMC_SIZE_1K = 1024Added
nfctechMifareTagSizeMC_SIZE_MINI = 320Added
nfctechMifareClassicTypeTYPE_PRO = 2Added
nfctechMifareClassicTypeTYPE_PLUS = 1Added
nfctechMifareClassicTypeTYPE_CLASSIC = 0Added
nfctechMifareClassicTypeTYPE_UNKNOWN = -1Added
nfctechNdefTaggetNdefTagTypeString(type: NfcForumType): string;Added
nfctechNdefTagsetReadOnly(): Promise<number>;
setReadOnly(callback: AsyncCallback<number>): void;
Added
nfctechNdefTagcanSetReadOnly(): Promise<boolean>;
canSetReadOnly(callback: AsyncCallback<boolean>): void;
Added
nfctechNdefTagwriteNdef(msg: NdefMessage): Promise<number>;
writeNdef(msg: NdefMessage, callback: AsyncCallback<number>): void;
Added
nfctechNdefTagreadNdef(): Promise<NdefMessage>;
readNdef(callback: AsyncCallback<NdefMessage>): void;
Added
nfctechNdefTagisNdefWritable(): Promise<boolean>;
isNdefWritable(callback: AsyncCallback<boolean>): void;
Added
nfctechNdefTaggetNdefMessage(): NdefMessage;Added
nfctechNdefTaggetNdefTagType(): NfcForumType;Added
nfctechNdefTagcreateNdefMessage(data: string): NdefMessage;
createNdefMessage(ndefRecords: NdefRecord[]): NdefMessage;
Added
nfctechNfcForumTypeMIFARE_CLASSIC = 101Added
nfctechNfcForumTypeNFC_FORUM_TYPE_4 = 4Added
nfctechNfcForumTypeNFC_FORUM_TYPE_3 = 3Added
nfctechNfcForumTypeNFC_FORUM_TYPE_2 = 2Added
nfctechNfcForumTypeNFC_FORUM_TYPE_1 = 1Added
nfctechNdefMessagemessageToString(ndefMessage: NdefMessage): string;Added
nfctechNdefMessagemakeExternalRecord(domainName: string, serviceName: string, externalData: string): NdefRecord;Added
nfctechNdefMessagemakeMimeRecord(mimeType: string, mimeData: string): NdefRecord;Added
nfctechNdefMessagemakeTextRecord(text: string, locale: string): NdefRecord;Added
nfctechNdefMessagemakeUriRecord(uri: string): NdefRecord;Added
nfctechNdefMessagegetNdefRecords(): NdefRecord[];Added
nfctechRtdTypeRTD_URI: 'U';Added
nfctechRtdTypeRTD_TEXT: 'T';Added
nfctechTnfTypeTNF_UNCHANGED = 0x6Added
nfctechTnfTypeTNF_UNKNOWN = 0x5Added
nfctechTnfTypeTNF_EXT_APP = 0x4Added
nfctechTnfTypeTNF_ABSOLUTE_URI = 0x3Added
nfctechTnfTypeTNF_MEDIA = 0x2Added
nfctechTnfTypeTNF_WELL_KNOWN = 0x1Added
nfctechTnfTypeTNF_EMPTY = 0x0Added
nfctechNdefRecordpayload: string;Added
nfctechNdefRecordid: string;Added
nfctechNdefRecordrtdType: string;Added
nfctechNdefRecordtnf: number;Added
nfctechIsoDepTagisExtendedApduSupported(): Promise<boolean>;
isExtendedApduSupported(callback: AsyncCallback<boolean>): void;
Added
nfctechIsoDepTaggetHiLayerResponse(): string;Added
nfctechIsoDepTaggetHistoricalBytes(): string;Added
ohos.bluetoothProfileIdPROFILE_PAN_NETWORK = 7Added
ohos.bluetoothScanFiltermanufactureDataMask?: ArrayBuffer;Added
ohos.bluetoothScanFiltermanufactureData?: ArrayBuffer;Added
ohos.bluetoothScanFiltermanufactureId?: number;Added
ohos.bluetoothScanFilterserviceDataMask?: ArrayBuffer;Added
ohos.bluetoothScanFilterserviceData?: ArrayBuffer;Added
ohos.bluetoothScanFilterserviceSolicitationUuidMask?: string;Added
ohos.bluetoothScanFilterserviceSolicitationUuid?: string;Added
ohos.bluetoothScanFilterserviceUuidMask?: string;Added
ohos.bluetoothPanProfileisTetheringOn(): boolean;Added
ohos.bluetoothPanProfilesetTethering(enable: boolean): void;Added
ohos.bluetoothPanProfileoff(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void;Added
ohos.bluetoothPanProfileon(type: "connectionStateChange", callback: Callback<StateChangeParam>): void;Added
ohos.bluetoothPanProfiledisconnect(device: string): boolean;Added
ohos.bluetoothbluetoothgetProfileInst(profileId: ProfileId): A2dpSourceProfile |HandsFreeAudioGatewayProfile |HidHostProfile |PanProfile;Added
ohos.nfc.tagTagInforemoteTagService: rpc.RemoteObject;Added
ohos.nfc.tagTagInfotagRfDiscId: number;Added
ohos.nfc.tagTagInfoextrasData: PacMap[];Added
ohos.nfc.tagTagInfotechnology: number[];Added
ohos.nfc.tagTagInfouid: string;Added
ohos.nfc.tagtaggetNdefFormatableTag(tagInfo: TagInfo): NdefFormatableTagAdded
ohos.nfc.tagtaggetMifareUltralightTag(tagInfo: TagInfo): MifareUltralightTagAdded
ohos.nfc.tagtaggetMifareClassicTag(tagInfo: TagInfo): MifareClassicTagAdded
ohos.nfc.tagtaggetNdefTag(tagInfo: TagInfo): NdefTagAdded
ohos.nfc.tagtaggetIsoDepTag(tagInfo: TagInfo): IsoDepTagAdded
ohos.nfc.tagtagconst NDEF_FORMATABLE = 10;Added
ohos.wifiWifiLinkedInfomacType: number;Added
ohos.wifiWifiSecurityTypeWIFI_SEC_TYPE_WAPI_PSK = 9Added
ohos.wifiWifiSecurityTypeWIFI_SEC_TYPE_WAPI_CERT = 8Added
ohos.wifiWifiSecurityTypeWIFI_SEC_TYPE_OWE = 7Added
ohos.wifiWifiSecurityTypeWIFI_SEC_TYPE_EAP_SUITE_B = 6Added
ohos.wifiWifiSecurityTypeWIFI_SEC_TYPE_EAP = 5Added
ohos.wifiWifiScanInfoinfoElems: Array<WifiInfoElem>;Added
ohos.wifiWifiScanInfocenterFrequency1: number;Added
ohos.wifiWifiScanInfocenterFrequency0: number;Added
ohos.wifiWifiChannelWidthWIDTH_INVALIDAdded
ohos.wifiWifiChannelWidthWIDTH_80MHZ_PLUS = 4Added
ohos.wifiWifiChannelWidthWIDTH_160MHZ = 3Added
ohos.wifiWifiChannelWidthWIDTH_80MHZ = 2Added
ohos.wifiWifiChannelWidthWIDTH_40MHZ = 1Added
ohos.wifiWifiChannelWidthWIDTH_20MHZ = 0Added
ohos.wifiWifiInfoElemcontent: Uint8Array;Added
ohos.wifiWifiInfoElemeid: number;Added
ohos.wifiWifiDeviceConfigeapConfig: WifiEapConfig;Added
ohos.wifiWifiEapConfigeapSubId: number;Added
ohos.wifiWifiEapConfigplmn: string;Added
ohos.wifiWifiEapConfigrealm: string;Added
ohos.wifiWifiEapConfigdomainSuffixMatch: string;Added
ohos.wifiWifiEapConfigaltSubjectMatch: string;Added
ohos.wifiWifiEapConfigclientCertAliases: string;Added
ohos.wifiWifiEapConfigcaPath: string;Added
ohos.wifiWifiEapConfigcaCertAliases: string;Added
ohos.wifiWifiEapConfigpassword: string;Added
ohos.wifiWifiEapConfiganonymousIdentity: string;Added
ohos.wifiWifiEapConfigidentity: string;Added
ohos.wifiWifiEapConfigphase2Method: Phase2Method;Added
ohos.wifiWifiEapConfigeapMethod: EapMethod;Added
ohos.wifiPhase2MethodPHASE2_AKA_PRIMEAdded
ohos.wifiPhase2MethodPHASE2_AKAAdded
ohos.wifiPhase2MethodPHASE2_SIMAdded
ohos.wifiPhase2MethodPHASE2_GTCAdded
ohos.wifiPhase2MethodPHASE2_MSCHAPV2Added
ohos.wifiPhase2MethodPHASE2_MSCHAPAdded
ohos.wifiPhase2MethodPHASE2_PAPAdded
ohos.wifiPhase2MethodPHASE2_NONEAdded
ohos.wifiEapMethodEAP_UNAUTH_TLSAdded
ohos.wifiEapMethodEAP_AKA_PRIMEAdded
ohos.wifiEapMethodEAP_AKAAdded
ohos.wifiEapMethodEAP_SIMAdded
ohos.wifiEapMethodEAP_PWDAdded
ohos.wifiEapMethodEAP_TTLSAdded
ohos.wifiEapMethodEAP_TLSAdded
ohos.wifiEapMethodEAP_PEAPAdded
ohos.wifiEapMethodEAP_NONEAdded
ohos.wifiwifigetP2pGroups(): Promise<Array<WifiP2pGroupInfo>>;
getP2pGroups(callback: AsyncCallback<Array<WifiP2pGroupInfo>>): void;
Added
ohos.wifiwifigetP2pLocalDevice(): Promise<WifiP2pDevice>;
getP2pLocalDevice(callback: AsyncCallback<WifiP2pDevice>): void;
Added
ohos.wifiwificonnectToCandidateConfig(networkId: number): void;Added
ohos.wifiwifigetCandidateConfigs(): Array<WifiDeviceConfig>;Added
ohos.wifiwifiremoveCandidateConfig(networkId: number): Promise<void>;
removeCandidateConfig(networkId: number, callback: AsyncCallback<void>): void;
Added
ohos.wifiwifiaddCandidateConfig(config: WifiDeviceConfig): Promise<number>;
addCandidateConfig(config: WifiDeviceConfig, callback: AsyncCallback<number>): void;
Added
ohos.wifiwifigetScanInfosSync(): Array<WifiScanInfo>;Added
ohos.bluetoothA2dpSourceProfilegetPlayingState(device: string): PlayingState;Deprecated
ohos.nfc.tagTagInfosupportedProfiles: number[];Deprecated

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)Adaptation Guide for the Application Sandbox

harmony(鸿蒙)Updates (OpenHarmony 3.2 Beta1 -> OpenHarmony 3.2 Beta2)

harmony(鸿蒙)JS API Changes of the Ability Framework

harmony(鸿蒙)JS API Changes of the Accessibility Subsystem

harmony(鸿蒙)JS API Changes of the Account Subsystem

harmony(鸿蒙)JS API Changes of the ArkUI Development Framework

harmony(鸿蒙)JS API Changes of the Bundle Management Framework

harmony(鸿蒙)JS API Changes of the Utils Subsystem

harmony(鸿蒙)JS API Changes of the DFX Subsystem

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