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

2022-08-09 浏览 (774)

JS API Changes of the Communication Subsystem

The table below lists the APIs changes of the communication subsystem in OpenHarmony 3.1 Release over OpenHarmony 3.0 LTS.

API Changes

ModuleClassMethod/Attribute/Enumeration/ConstantChange Type
tagSessionTagSessiongetMaxSendLength(): number;Added
tagSessionTagSessionsendData(data: number[]): Promise<number[]>;
sendData(data: number[], callback: AsyncCallback<number[]>): void;
Added
tagSessionTagSessiongetSendDataTimeout(): number;Added
tagSessionTagSessionsetSendDataTimeout(timeout: number): boolean;Added
tagSessionTagSessionisTagConnected(): boolean;Added
tagSessionTagSessionreset(): void;Added
tagSessionTagSessionconnectTag(): boolean;Added
tagSessionTagSessiongetTagInfo(): tag.TagInfo;Added
nfctechNfcVTaggetDsfId(): number;Added
nfctechNfcVTaggetResponseFlags(): number;Added
nfctechNfcFTaggetPmm(): number[];Added
nfctechNfcFTaggetSystemCode(): number[];Added
nfctechNfcBTaggetRespProtocol(): number[];Added
nfctechNfcBTaggetRespAppData(): number[];Added
nfctechNfcATaggetAtqa(): number[];Added
nfctechNfcATaggetSak(): number;Added
ohos.wifiextPowerModelTHROUGH_WALL = 2Added
ohos.wifiextPowerModelGENERAL = 1Added
ohos.wifiextPowerModelSLEEPING = 0Added
ohos.wifiextwifiextsetPowerModel(model: PowerModel) : booleanAdded
ohos.wifiextwifiextgetPowerModel (): Promise<PowerModel>;
getPowerModel (callback: AsyncCallback<PowerModel>): void;
Added
ohos.wifiextwifiextgetSupportedPowerModel(): Promise<Array<PowerModel>>;
getSupportedPowerModel(callback: AsyncCallback<Array<PowerModel>>): void;
Added
ohos.wifiextwifiextdisableHotspot(): boolean;Added
ohos.wifiextwifiextenableHotspot(): boolean;Added
ohos.wifiGroupOwnerBandGO_BAND_5GHZ = 2Added
ohos.wifiGroupOwnerBandGO_BAND_2GHZ = 1Added
ohos.wifiGroupOwnerBandGO_BAND_AUTO = 0Added
ohos.wifiP2pDeviceStatusUNAVAILABLE = 4Added
ohos.wifiP2pDeviceStatusAVAILABLE = 3Added
ohos.wifiP2pDeviceStatusFAILED = 2Added
ohos.wifiP2pDeviceStatusINVITED = 1Added
ohos.wifiP2pDeviceStatusCONNECTED = 0Added
ohos.wifiWifiP2pLinkedInfogroupOwnerAddr: string;Added
ohos.wifiWifiP2pLinkedInfoisGroupOwner: boolean;Added
ohos.wifiWifiP2pLinkedInfoconnectState: P2pConnectState;Added
ohos.wifiP2pConnectStateCONNECTED = 1Added
ohos.wifiP2pConnectStateDISCONNECTED = 0Added
ohos.wifiWifiP2pGroupInfogoIpAddress: string;Added
ohos.wifiWifiP2pGroupInfoclientDevices: WifiP2pDevice[];Added
ohos.wifiWifiP2pGroupInfofrequency: number;Added
ohos.wifiWifiP2pGroupInfonetworkId: number;Added
ohos.wifiWifiP2pGroupInfogroupName: string;Added
ohos.wifiWifiP2pGroupInfointerface: string;Added
ohos.wifiWifiP2pGroupInfopassphrase: string;Added
ohos.wifiWifiP2pGroupInfoownerInfo: WifiP2pDevice;Added
ohos.wifiWifiP2pGroupInfoisP2pGo: boolean;Added
ohos.wifiWifiP2PConfiggoBand: GroupOwnerBand;Added
ohos.wifiWifiP2PConfiggroupName: string;Added
ohos.wifiWifiP2PConfigpassphrase: string;Added
ohos.wifiWifiP2PConfignetId: number;Added
ohos.wifiWifiP2PConfigdeviceAddress: string;Added
ohos.wifiWifiP2pDevicegroupCapabilitys: number;Added
ohos.wifiWifiP2pDevicedeviceStatus: P2pDeviceStatus;Added
ohos.wifiWifiP2pDeviceprimaryDeviceType: string;Added
ohos.wifiWifiP2pDevicedeviceAddress: string;Added
ohos.wifiWifiP2pDevicedeviceName: string;Added
ohos.wifiConnStateUNKNOWNAdded
ohos.wifiConnStateDISCONNECTEDAdded
ohos.wifiConnStateDISCONNECTINGAdded
ohos.wifiConnStateCONNECTEDAdded
ohos.wifiConnStateOBTAINING_IPADDRAdded
ohos.wifiConnStateAUTHENTICATINGAdded
ohos.wifiConnStateCONNECTINGAdded
ohos.wifiConnStateSCANNINGAdded
ohos.wifiIpInfoleaseDuration: number;Added
ohos.wifiIpInfoserverIp: number;Added
ohos.wifiIpInfosecondDns: number;Added
ohos.wifiIpInfoprimaryDns: number;Added
ohos.wifiIpInfonetmask: number;Added
ohos.wifiIpInfogateway: number;Added
ohos.wifiIpInfoipAddress: number;Added
ohos.wifiWifiLinkedInfoconnState: ConnState;Added
ohos.wifiWifiLinkedInfoipAddress: number;Added
ohos.wifiWifiLinkedInfomacAddress: string;Added
ohos.wifiWifiLinkedInfoisRestricted: boolean;Added
ohos.wifiWifiLinkedInfoisHidden: boolean;Added
ohos.wifiWifiLinkedInfofrequency: number;Added
ohos.wifiWifiLinkedInfolinkSpeed: number;Added
ohos.wifiWifiLinkedInfoband: number;Added
ohos.wifiWifiLinkedInforssi: number;Added
ohos.wifiWifiLinkedInfobssid: string;Added
ohos.wifiWifiLinkedInfossid: string;Added
ohos.wifiWifiScanInfochannelWidth: number;Added
ohos.wifiWifiScanInfocapabilities: string;Added
ohos.wifiwifioff(type: "p2pDiscoveryChange", callback?: Callback<number>): void;Added
ohos.wifiwifion(type: "p2pDiscoveryChange", callback: Callback<number>): void;Added
ohos.wifiwifioff(type: "p2pPersistentGroupChange", callback?: Callback<void>): void;Added
ohos.wifiwifion(type: "p2pPersistentGroupChange", callback: Callback<void>): void;Added
ohos.wifiwifioff(type: "p2pPeerDeviceChange", callback?: Callback<WifiP2pDevice[]>): void;Added
ohos.wifiwifion(type: "p2pPeerDeviceChange", callback: Callback<WifiP2pDevice[]>): void;Added
ohos.wifiwifioff(type: "p2pDeviceChange", callback?: Callback<WifiP2pDevice>): void;Added
ohos.wifiwifion(type: "p2pDeviceChange", callback: Callback<WifiP2pDevice>): void;Added
ohos.wifiwifioff(type: "p2pConnectionChange", callback?: Callback<WifiP2pLinkedInfo>): void;Added
ohos.wifiwifion(type: "p2pConnectionChange", callback: Callback<WifiP2pLinkedInfo>): void;Added
ohos.wifiwifioff(type: "p2pStateChange", callback?: Callback<number>): void;Added
ohos.wifiwifion(type: "p2pStateChange", callback: Callback<number>): void;Added
ohos.wifiwifioff(type: "hotspotStateChange", callback?: Callback<number>): void;Added
ohos.wifiwifion(type: "hotspotStateChange", callback: Callback<number>): void;Added
ohos.wifiwifioff(type: "wifiRssiChange", callback?: Callback<number>): void;Added
ohos.wifiwifion(type: "wifiRssiChange", callback: Callback<number>): void;Added
ohos.wifiwifioff(type: "wifiScanStateChange", callback?: Callback<number>): void;Added
ohos.wifiwifion(type: "wifiScanStateChange", callback: Callback<number>): void;Added
ohos.wifiwifioff(type: "wifiConnectionChange", callback?: Callback<number>): void;Added
ohos.wifiwifion(type: "wifiConnectionChange", callback: Callback<number>): void;Added
ohos.wifiwifioff(type: "wifiStateChange", callback?: Callback<number>): void;Added
ohos.wifiwifion(type: "wifiStateChange", callback: Callback<number>): void;Added
ohos.wifiwifistopDiscoverDevices(): boolean;Added
ohos.wifiwifistartDiscoverDevices(): boolean;Added
ohos.wifiwifip2pCancelConnect(): boolean;Added
ohos.wifiwifip2pConnect(config: WifiP2PConfig): boolean;Added
ohos.wifiwifiremoveGroup(): boolean;Added
ohos.wifiwificreateGroup(config: WifiP2PConfig): boolean;Added
ohos.wifiwifigetP2pPeerDevices(): Promise<WifiP2pDevice[]>;
getP2pPeerDevices(callback: AsyncCallback<WifiP2pDevice[]>): void;
Added
ohos.wifiwifigetCurrentGroup(): Promise<WifiP2pGroupInfo>;
getCurrentGroup(callback: AsyncCallback<WifiP2pGroupInfo>): void;
Added
ohos.wifiwifigetP2pLinkedInfo(): Promise<WifiP2pLinkedInfo>;
getP2pLinkedInfo(callback: AsyncCallback<WifiP2pLinkedInfo>): void;
Added
ohos.wifiwifigetCountryCode(): string;Added
ohos.wifiwifigetIpInfo(): IpInfo;Added
ohos.wifiwifiisFeatureSupported(featureId: number): boolean;Added
ohos.wifiwifiisConnected(): boolean;Added
ohos.wifiwifigetLinkedInfo(): Promise<WifiLinkedInfo>;
getLinkedInfo(callback: AsyncCallback<WifiLinkedInfo>): void;
Added
ohos.wifiwifiremoveUntrustedConfig(config: WifiDeviceConfig): Promise<boolean>;
removeUntrustedConfig(config: WifiDeviceConfig, callback: AsyncCallback<boolean>): void;
Added
ohos.wifiwifiaddUntrustedConfig(config: WifiDeviceConfig): Promise<boolean>;
addUntrustedConfig(config: WifiDeviceConfig, callback: AsyncCallback<boolean>): void;
Added
ohos.nfc.tagTagInfosupportedProfiles: number[];Added
ohos.nfc.tagtaggetNfcVTag(tagInfo: TagInfo): NfcVTagAdded
ohos.nfc.tagtaggetNfcFTag(tagInfo: TagInfo): NfcFTagAdded
ohos.nfc.tagtaggetNfcBTag(tagInfo: TagInfo): NfcBTagAdded
ohos.nfc.tagtaggetNfcATag(tagInfo: TagInfo): NfcATagAdded
ohos.nfc.tagtagconst MIFARE_ULTRALIGHT = 9;Added
ohos.nfc.tagtagconst MIFARE_CLASSIC = 8;Added
ohos.nfc.tagtagconst NDEF = 6;Added
ohos.nfc.tagtagconst NFC_V = 5;Added
ohos.nfc.tagtagconst NFC_F = 4;Added
ohos.nfc.tagtagconst ISO_DEP = 3;Added
ohos.nfc.tagtagconst NFC_B = 2;Added
ohos.nfc.tagtagconst NFC_A = 1;Added
ohos.nfc.controllernfcControllergetNfcState(): NfcStateAdded
ohos.nfc.controllernfcControllerisNfcOpen(): booleanAdded
ohos.nfc.controllernfcControllercloseNfc(): booleanAdded
ohos.nfc.controllernfcControlleropenNfc(): booleanAdded
ohos.nfc.controllernfcControlleroff(type: "nfcStateChange", callback?: Callback<NfcState>): voidAdded
ohos.nfc.controllernfcControlleron(type: "nfcStateChange", callback: Callback<NfcState>): voidAdded
ohos.nfc.controllernfcControllerisNfcAvailable(): booleanAdded
ohos.nfc.controllerNfcStateSTATE_TURNING_OFF = 4Added
ohos.nfc.controllerNfcStateSTATE_ON = 3Added
ohos.nfc.controllerNfcStateSTATE_TURNING_ON = 2Added
ohos.nfc.controllerNfcStateSTATE_OFF = 1Added
ohos.nfc.cardEmulationHceServicesendResponse(responseApdu: number[]): void;Added
ohos.nfc.cardEmulationHceServiceon(type: "hceCmd", callback: AsyncCallback<number[]>): void;Added
ohos.nfc.cardEmulationHceServicestopHCE(): boolean;Added
ohos.nfc.cardEmulationHceServicestartHCE(aidList: string[]): boolean;Added
ohos.nfc.cardEmulationcardEmulationisSupported(feature: number): boolean;Added
ohos.nfc.cardEmulationFeatureTypeESE = 2Added
ohos.nfc.cardEmulationFeatureTypeUICC = 1Added
ohos.nfc.cardEmulationFeatureTypeHCE = 0Added
ohos.connectedTagNfcRfTypeNFC_RF_ENTER = 1Added
ohos.connectedTagNfcRfTypeNFC_RF_LEAVE = 0Added
ohos.connectedTagconnectedTagoff(type: "notify", callback?:Callback<number>): void;Added
ohos.connectedTagconnectedTagon(type: "notify", callback: Callback<number>): void;Added
ohos.connectedTagconnectedTagwriteNdefTag(data: string): Promise<void>;
writeNdefTag(data: string, callback: AsyncCallback<void>): void;
Added
ohos.connectedTagconnectedTagreadNdefTag(): Promise<string>;
readNdefTag(callback: AsyncCallback<string>): void;
Added
ohos.connectedTagconnectedTaguninit(): boolean;Added
ohos.connectedTagconnectedTaginit(): boolean;Added
ohos.bluetoothProfileIdPROFILE_HANDS_FREE_AUDIO_GATEWAY = 4Added
ohos.bluetoothProfileIdPROFILE_A2DP_SOURCE = 1Added
ohos.bluetoothPlayingStateSTATE_PLAYINGAdded
ohos.bluetoothPlayingStateSTATE_NOT_PLAYINGAdded
ohos.bluetoothStateChangeParamstate: ProfileConnectionState;Added
ohos.bluetoothStateChangeParamdeviceId: string;Added
ohos.bluetoothMajorMinorClassHEALTH_PERSONAL_MOBILITY_DEVICE = 0x093CAdded
ohos.bluetoothMajorMinorClassHEALTH_GENERIC_HEALTH_MANAGER = 0x0938Added
ohos.bluetoothMajorMinorClassHEALTH_ANKLE_PROSTHESIS = 0x0934Added
ohos.bluetoothMajorMinorClassHEALTH_KNEE_PROSTHESIS = 0x0930Added
ohos.bluetoothMajorMinorClassHEALTH_MEDICATION_MONITOR = 0x092CAdded
ohos.bluetoothMajorMinorClassHEALTH_PEAK_FLOW_MOITOR = 0x0928Added
ohos.bluetoothMajorMinorClassHEALTH_BODY_COMPOSITION_ANALYZER = 0x0924Added
ohos.bluetoothMajorMinorClassHEALTH_STEP_COUNTER = 0x0920Added
ohos.bluetoothMajorMinorClassHEALTH_DATA_DISPLAY = 0x091CAdded
ohos.bluetoothMajorMinorClassHEALTH_PULSE_RATE = 0x0918Added
ohos.bluetoothMajorMinorClassHEALTH_PULSE_OXIMETER = 0x0914Added
ohos.bluetoothMajorMinorClassHEALTH_GLUCOSE = 0x0910Added
ohos.bluetoothMajorMinorClassHEALTH_WEIGHING = 0x090CAdded
ohos.bluetoothMajorMinorClassHEALTH_THERMOMETER = 0x0908Added
ohos.bluetoothMajorMinorClassHEALTH_BLOOD_PRESSURE = 0x0904Added
ohos.bluetoothMajorMinorClassHEALTH_UNCATEGORIZED = 0x0900Added
ohos.bluetoothMajorMinorClassTOY_GAME = 0x0814Added
ohos.bluetoothMajorMinorClassTOY_CONTROLLER = 0x0810Added
ohos.bluetoothMajorMinorClassTOY_DOLL_ACTION_FIGURE = 0x080CAdded
ohos.bluetoothMajorMinorClassTOY_VEHICLE = 0x0808Added
ohos.bluetoothMajorMinorClassTOY_ROBOT = 0x0804Added
ohos.bluetoothMajorMinorClassTOY_UNCATEGORIZED = 0x0800Added
ohos.bluetoothMajorMinorClassWEARABLE_GLASSES = 0x0714Added
ohos.bluetoothMajorMinorClassWEARABLE_HELMET = 0x0710Added
ohos.bluetoothMajorMinorClassWEARABLE_JACKET = 0x070CAdded
ohos.bluetoothMajorMinorClassWEARABLE_PAGER = 0x0708Added
ohos.bluetoothMajorMinorClassWEARABLE_WRIST_WATCH = 0x0704Added
ohos.bluetoothMajorMinorClassWEARABLE_UNCATEGORIZED = 0x0700Added
ohos.bluetoothMajorMinorClassIMAGING_PRINTER = 0x0680Added
ohos.bluetoothMajorMinorClassIMAGING_SCANNER = 0x0640Added
ohos.bluetoothMajorMinorClassIMAGING_CAMERA = 0x0620Added
ohos.bluetoothMajorMinorClassIMAGING_DISPLAY = 0x0610Added
ohos.bluetoothMajorMinorClassIMAGING_UNCATEGORIZED = 0x0600Added
ohos.bluetoothMajorMinorClassPERIPHERAL_GESTURAL_INPUT = 0x0522Added
ohos.bluetoothMajorMinorClassPERIPHERAL_SCANNER_RFID = 0x0520Added
ohos.bluetoothMajorMinorClassPERIPHERAL_DIGITAL_PEN = 0x051CAdded
ohos.bluetoothMajorMinorClassPERIPHERAL_CARD_READER = 0x0518Added
ohos.bluetoothMajorMinorClassPERIPHERAL_DIGITIZER_TABLET = 0x0514Added
ohos.bluetoothMajorMinorClassPERIPHERAL_SENSING_DEVICE = 0x0510Added
ohos.bluetoothMajorMinorClassPERIPHERAL_REMOTE_CONTROL = 0x05C0Added
ohos.bluetoothMajorMinorClassPERIPHERAL_GAMEPAD = 0x0508Added
ohos.bluetoothMajorMinorClassPERIPHERAL_JOYSTICK = 0x0504Added
ohos.bluetoothMajorMinorClassPERIPHERAL_UNCATEGORIZED = 0x0500Added
ohos.bluetoothMajorMinorClassPERIPHERAL_KEYBOARD_POINTING = 0x05C0Added
ohos.bluetoothMajorMinorClassPERIPHERAL_POINTING_DEVICE = 0x0580Added
ohos.bluetoothMajorMinorClassPERIPHERAL_KEYBOARD = 0x0540Added
ohos.bluetoothMajorMinorClassPERIPHERAL_NON_KEYBOARD_NON_POINTING = 0x0500Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VIDEO_GAMING_TOY = 0x0448Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VIDEO_CONFERENCING = 0x0440Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER = 0x043CAdded
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VIDEO_MONITOR = 0x0438Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_CAMCORDER = 0x0434Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VIDEO_CAMERA = 0x0430Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VCR = 0x042CAdded
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_HIFI_AUDIO = 0x0428Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_SET_TOP_BOX = 0x0424Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_CAR_AUDIO = 0x0420Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_PORTABLE_AUDIO = 0x041CAdded
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_HEADPHONES = 0x0418Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_LOUDSPEAKER = 0x0414Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_MICROPHONE = 0x0410Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_HANDSFREE = 0x0408Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_WEARABLE_HEADSET = 0x0404Added
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_UNCATEGORIZED = 0x0400Added
ohos.bluetoothMajorMinorClassNETWORK_NO_SERVICE = 0x03E0Added
ohos.bluetoothMajorMinorClassNETWORK_83_TO_99_UTILIZED = 0x03C0Added
ohos.bluetoothMajorMinorClassNETWORK_67_TO_83_UTILIZED = 0x03A0Added
ohos.bluetoothMajorMinorClassNETWORK_60_TO_67_UTILIZED = 0x0380Added
ohos.bluetoothMajorMinorClassNETWORK_33_TO_50_UTILIZED = 0x0360Added
ohos.bluetoothMajorMinorClassNETWORK_17_TO_33_UTILIZED = 0x0340Added
ohos.bluetoothMajorMinorClassNETWORK_1_TO_17_UTILIZED = 0x0320Added
ohos.bluetoothMajorMinorClassNETWORK_FULLY_AVAILABLE = 0x0300Added
ohos.bluetoothMajorMinorClassPHONE_ISDN = 0x0214Added
ohos.bluetoothMajorMinorClassPHONE_MODEM_OR_GATEWAY = 0x0210Added
ohos.bluetoothMajorMinorClassPHONE_SMART = 0x020CAdded
ohos.bluetoothMajorMinorClassPHONE_CORDLESS = 0x0208Added
ohos.bluetoothMajorMinorClassPHONE_CELLULAR = 0x0204Added
ohos.bluetoothMajorMinorClassPHONE_UNCATEGORIZED = 0x0200Added
ohos.bluetoothMajorMinorClassCOMPUTER_TABLET = 0x011CAdded
ohos.bluetoothMajorMinorClassCOMPUTER_WEARABLE = 0x0118Added
ohos.bluetoothMajorMinorClassCOMPUTER_PALM_SIZE_PC_PDA = 0x0114Added
ohos.bluetoothMajorMinorClassCOMPUTER_HANDHELD_PC_PDA = 0x0110Added
ohos.bluetoothMajorMinorClassCOMPUTER_LAPTOP = 0x010CAdded
ohos.bluetoothMajorMinorClassCOMPUTER_SERVER = 0x0108Added
ohos.bluetoothMajorMinorClassCOMPUTER_DESKTOP = 0x0104Added
ohos.bluetoothMajorMinorClassCOMPUTER_UNCATEGORIZED = 0x0100Added
ohos.bluetoothMajorClassMAJOR_UNCATEGORIZED = 0x1F00Added
ohos.bluetoothMajorClassMAJOR_HEALTH = 0x0900Added
ohos.bluetoothMajorClassMAJOR_TOY = 0x0800Added
ohos.bluetoothMajorClassMAJOR_WEARABLE = 0x0700Added
ohos.bluetoothMajorClassMAJOR_IMAGING = 0x0600Added
ohos.bluetoothMajorClassMAJOR_PERIPHERAL = 0x0500Added
ohos.bluetoothMajorClassMAJOR_AUDIO_VIDEO = 0x0400Added
ohos.bluetoothMajorClassMAJOR_NETWORKING = 0x0300Added
ohos.bluetoothMajorClassMAJOR_PHONE = 0x0200Added
ohos.bluetoothMajorClassMAJOR_COMPUTER = 0x0100Added
ohos.bluetoothMajorClassMAJOR_MISC = 0x0000Added
ohos.bluetoothBondStateBOND_STATE_BONDED = 2Added
ohos.bluetoothBondStateBOND_STATE_BONDING = 1Added
ohos.bluetoothBondStateBOND_STATE_INVALID = 0Added
ohos.bluetoothScanModeSCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE = 5Added
ohos.bluetoothScanModeSCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE = 4Added
ohos.bluetoothScanModeSCAN_MODE_LIMITED_DISCOVERABLE = 3Added
ohos.bluetoothScanModeSCAN_MODE_GENERAL_DISCOVERABLE = 2Added
ohos.bluetoothScanModeSCAN_MODE_CONNECTABLE = 1Added
ohos.bluetoothScanModeSCAN_MODE_NONE = 0Added
ohos.bluetoothSppTypeSPP_RFCOMMAdded
ohos.bluetoothBluetoothStateSTATE_BLE_TURNING_OFF = 6Added
ohos.bluetoothBluetoothStateSTATE_BLE_ON = 5Added
ohos.bluetoothBluetoothStateSTATE_BLE_TURNING_ON = 4Added
ohos.bluetoothBluetoothStateSTATE_TURNING_OFF = 3Added
ohos.bluetoothBluetoothStateSTATE_ON = 2Added
ohos.bluetoothBluetoothStateSTATE_TURNING_ON = 1Added
ohos.bluetoothBluetoothStateSTATE_OFF = 0Added
ohos.bluetoothProfileConnectionStateSTATE_DISCONNECTING = 3Added
ohos.bluetoothProfileConnectionStateSTATE_CONNECTED = 2Added
ohos.bluetoothProfileConnectionStateSTATE_CONNECTING = 1Added
ohos.bluetoothProfileConnectionStateSTATE_DISCONNECTED = 0Added
ohos.bluetoothMatchModeMATCH_MODE_STICKY = 2Added
ohos.bluetoothMatchModeMATCH_MODE_AGGRESSIVE = 1Added
ohos.bluetoothScanDutySCAN_MODE_LOW_LATENCY = 2Added
ohos.bluetoothScanDutySCAN_MODE_BALANCED = 1Added
ohos.bluetoothScanDutySCAN_MODE_LOW_POWER = 0Added
ohos.bluetoothBondStateParamstate: BondState;Added
ohos.bluetoothBondStateParamdeviceId: string;Added
ohos.bluetoothDeviceClassclassOfDevice: number;Added
ohos.bluetoothDeviceClassmajorMinorClass: MajorMinorClass;Added
ohos.bluetoothDeviceClassmajorClass: MajorClass;Added
ohos.bluetoothPinRequiredParampinCode: string;Added
ohos.bluetoothPinRequiredParamdeviceId: string;Added
ohos.bluetoothSppOptiontype: SppType;Added
ohos.bluetoothSppOptionsecure: boolean;Added
ohos.bluetoothSppOptionuuid: string;Added
ohos.bluetoothScanOptionsmatchMode?: MatchMode;Added
ohos.bluetoothScanOptionsdutyMode?: ScanDuty;Added
ohos.bluetoothScanOptionsinterval?: number;Added
ohos.bluetoothScanFilterserviceUuid?: string;Added
ohos.bluetoothScanFiltername?: string;Added
ohos.bluetoothScanFilterdeviceId?: string;Added
ohos.bluetoothServiceDataserviceValue: ArrayBuffer;Added
ohos.bluetoothServiceDataserviceUuid: string;Added
ohos.bluetoothManufactureDatamanufactureValue: ArrayBuffer;Added
ohos.bluetoothManufactureDatamanufactureId: number;Added
ohos.bluetoothAdvertiseDataserviceData: Array<ServiceData>;Added
ohos.bluetoothAdvertiseDatamanufactureData: Array<ManufactureData>;Added
ohos.bluetoothAdvertiseDataserviceUuids: Array<string>;Added
ohos.bluetoothAdvertiseSettingconnectable?: boolean;Added
ohos.bluetoothAdvertiseSettingtxPower?: number;Added
ohos.bluetoothAdvertiseSettinginterval?: number;Added
ohos.bluetoothScanResultdata: ArrayBuffer;Added
ohos.bluetoothScanResultrssi: number;Added
ohos.bluetoothScanResultdeviceId: string;Added
ohos.bluetoothBLEConnectChangedStatestate: ProfileConnectionState;Added
ohos.bluetoothBLEConnectChangedStatedeviceId: string;Added
ohos.bluetoothServerResponsevalue: ArrayBuffer;Added
ohos.bluetoothServerResponseoffset: number;Added
ohos.bluetoothServerResponsestatus: number;Added
ohos.bluetoothServerResponsetransId: number;Added
ohos.bluetoothServerResponsedeviceId: string;Added
ohos.bluetoothDescriptorWriteReqserviceUuid: string;Added
ohos.bluetoothDescriptorWriteReqcharacteristicUuid: string;Added
ohos.bluetoothDescriptorWriteReqdescriptorUuid: string;Added
ohos.bluetoothDescriptorWriteReqvalue: ArrayBuffer;Added
ohos.bluetoothDescriptorWriteReqneedRsp: boolean;Added
ohos.bluetoothDescriptorWriteReqisPrep: boolean;Added
ohos.bluetoothDescriptorWriteReqoffset: number;Added
ohos.bluetoothDescriptorWriteReqtransId: number;Added
ohos.bluetoothDescriptorWriteReqdeviceId: string;Added
ohos.bluetoothDescriptorReadReqserviceUuid: string;Added
ohos.bluetoothDescriptorReadReqcharacteristicUuid: string;Added
ohos.bluetoothDescriptorReadReqdescriptorUuid: string;Added
ohos.bluetoothDescriptorReadReqoffset: number;Added
ohos.bluetoothDescriptorReadReqtransId: number;Added
ohos.bluetoothDescriptorReadReqdeviceId: string;Added
ohos.bluetoothCharacteristicWriteReqserviceUuid: string;Added
ohos.bluetoothCharacteristicWriteReqcharacteristicUuid: string;Added
ohos.bluetoothCharacteristicWriteReqvalue: ArrayBuffer;Added
ohos.bluetoothCharacteristicWriteReqneedRsp: boolean;Added
ohos.bluetoothCharacteristicWriteReqisPrep: boolean;Added
ohos.bluetoothCharacteristicWriteReqoffset: number;Added
ohos.bluetoothCharacteristicWriteReqtransId: number;Added
ohos.bluetoothCharacteristicWriteReqdeviceId: string;Added
ohos.bluetoothCharacteristicReadReqserviceUuid: string;Added
ohos.bluetoothCharacteristicReadReqcharacteristicUuid: string;Added
ohos.bluetoothCharacteristicReadReqoffset: number;Added
ohos.bluetoothCharacteristicReadReqtransId: number;Added
ohos.bluetoothCharacteristicReadReqdeviceId: string;Added
ohos.bluetoothNotifyCharacteristicconfirm: boolean;Added
ohos.bluetoothNotifyCharacteristiccharacteristicValue: ArrayBuffer;Added
ohos.bluetoothNotifyCharacteristiccharacteristicUuid: string;Added
ohos.bluetoothNotifyCharacteristicserviceUuid: string;Added
ohos.bluetoothBLEDescriptordescriptorValue: ArrayBuffer;Added
ohos.bluetoothBLEDescriptordescriptorUuid: string;Added
ohos.bluetoothBLEDescriptorcharacteristicUuid: string;Added
ohos.bluetoothBLEDescriptorserviceUuid: string;Added
ohos.bluetoothBLECharacteristicdescriptors: Array<BLEDescriptor>;Added
ohos.bluetoothBLECharacteristiccharacteristicValue: ArrayBuffer;Added
ohos.bluetoothBLECharacteristiccharacteristicUuid: string;Added
ohos.bluetoothBLECharacteristicserviceUuid: string;Added
ohos.bluetoothGattServiceincludeServices?: Array<GattService>;Added
ohos.bluetoothGattServicecharacteristics: Array<BLECharacteristic>;Added
ohos.bluetoothGattServiceisPrimary: boolean;Added
ohos.bluetoothGattServiceserviceUuid: string;Added
ohos.bluetoothGattClientDeviceoff(type: "BLEConnectionStateChange", callback?: Callback<BLEConnectChangedState>): void;Added
ohos.bluetoothGattClientDeviceon(type: "BLEConnectionStateChange", callback: Callback<BLEConnectChangedState>): void;Added
ohos.bluetoothGattClientDeviceoff(type: "BLECharacteristicChange", callback?: Callback<BLECharacteristic>): void;Added
ohos.bluetoothGattClientDeviceon(type: "BLECharacteristicChange", callback: Callback<BLECharacteristic>): void;Added
ohos.bluetoothGattClientDevicesetNotifyCharacteristicChanged(characteristic: BLECharacteristic, enable: boolean): boolean;Added
ohos.bluetoothGattClientDevicesetBLEMtuSize(mtu: number): boolean;Added
ohos.bluetoothGattClientDevicegetRssiValue(callback: AsyncCallback<number>): void;
getRssiValue(): Promise<number>;
Added
ohos.bluetoothGattClientDevicewriteDescriptorValue(descriptor: BLEDescriptor): boolean;Added
ohos.bluetoothGattClientDevicewriteCharacteristicValue(characteristic: BLECharacteristic): boolean;Added
ohos.bluetoothGattClientDevicereadDescriptorValue(descriptor: BLEDescriptor, callback: AsyncCallback<BLEDescriptor>): void;
readDescriptorValue(descriptor: BLEDescriptor): Promise<BLEDescriptor>;
Added
ohos.bluetoothGattClientDevicereadCharacteristicValue(characteristic: BLECharacteristic, callback: AsyncCallback<BLECharacteristic>): void;
readCharacteristicValue(characteristic: BLECharacteristic): Promise<BLECharacteristic>;
Added
ohos.bluetoothGattClientDevicegetServices(callback: AsyncCallback<Array<GattService>>): void;
getServices(): Promise<Array<GattService>>;
Added
ohos.bluetoothGattClientDevicegetDeviceName(callback: AsyncCallback<string>): void;
getDeviceName(): Promise<string>;
Added
ohos.bluetoothGattClientDeviceclose(): boolean;Added
ohos.bluetoothGattClientDevicedisconnect(): boolean;Added
ohos.bluetoothGattClientDeviceconnect(): boolean;Added
ohos.bluetoothGattServeroff(type: "connectStateChange", callback?: Callback<BLEConnectChangedState>): void;Added
ohos.bluetoothGattServeron(type: "connectStateChange", callback: Callback<BLEConnectChangedState>): void;Added
ohos.bluetoothGattServeroff(type: "descriptorWrite", callback?: Callback<DescriptorWriteReq>): void;Added
ohos.bluetoothGattServeron(type: "descriptorWrite", callback: Callback<DescriptorWriteReq>): void;Added
ohos.bluetoothGattServeroff(type: "descriptorRead", callback?: Callback<DescriptorReadReq>): void;Added
ohos.bluetoothGattServeron(type: "descriptorRead", callback: Callback<DescriptorReadReq>): void;Added
ohos.bluetoothGattServeroff(type: "characteristicWrite", callback?: Callback<CharacteristicWriteReq>): void;Added
ohos.bluetoothGattServeron(type: "characteristicWrite", callback: Callback<CharacteristicWriteReq>): void;Added
ohos.bluetoothGattServeroff(type: "characteristicRead", callback?: Callback<CharacteristicReadReq>): void;Added
ohos.bluetoothGattServeron(type: "characteristicRead", callback: Callback<CharacteristicReadReq>): void;Added
ohos.bluetoothGattServersendResponse(serverResponse: ServerResponse): boolean;Added
ohos.bluetoothGattServernotifyCharacteristicChanged(deviceId: string, notifyCharacteristic: NotifyCharacteristic): boolean;Added
ohos.bluetoothGattServerclose(): void;Added
ohos.bluetoothGattServerremoveService(serviceUuid: string): boolean;Added
ohos.bluetoothGattServeraddService(service: GattService): boolean;Added
ohos.bluetoothGattServerstopAdvertising(): void;Added
ohos.bluetoothGattServerstartAdvertising(setting: AdvertiseSetting, advData: AdvertiseData, advResponse?: AdvertiseData): void;Added
ohos.bluetoothBLEoff(type: "BLEDeviceFind", callback?: Callback<Array<ScanResult>>): void;Added
ohos.bluetoothBLEon(type: "BLEDeviceFind", callback: Callback<Array<ScanResult>>): void;Added
ohos.bluetoothBLEstopBLEScan(): void;Added
ohos.bluetoothBLEstartBLEScan(filters: Array<ScanFilter>, options?: ScanOptions): void;Added
ohos.bluetoothBLEgetConnectedBLEDevices(): Array<string>;Added
ohos.bluetoothBLEcreateGattClientDevice(deviceId: string): GattClientDevice;Added
ohos.bluetoothBLEcreateGattServer(): GattServer;Added
ohos.bluetoothHandsFreeAudioGatewayProfileoff(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void;Added
ohos.bluetoothHandsFreeAudioGatewayProfileon(type: "connectionStateChange", callback: Callback<StateChangeParam>): void;Added
ohos.bluetoothHandsFreeAudioGatewayProfiledisconnect(device: string): boolean;Added
ohos.bluetoothHandsFreeAudioGatewayProfileconnect(device: string): boolean;Added
ohos.bluetoothA2dpSourceProfilegetPlayingState(device: string): PlayingState;Added
ohos.bluetoothA2dpSourceProfileoff(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void;Added
ohos.bluetoothA2dpSourceProfileon(type: "connectionStateChange", callback: Callback<StateChangeParam>): void;Added
ohos.bluetoothA2dpSourceProfiledisconnect(device: string): boolean;Added
ohos.bluetoothA2dpSourceProfileconnect(device: string): boolean;Added
ohos.bluetoothBaseProfilegetDeviceState(device: string): ProfileConnectionState;Added
ohos.bluetoothBaseProfilegetConnectionDevices(): Array<string>;Added
ohos.bluetoothbluetoothgetProfile(profileId: ProfileId): A2dpSourceProfile |HandsFreeAudioGatewayProfile;Added
ohos.bluetoothbluetoothoff(type: "sppRead", clientSocket: number, callback?: Callback<ArrayBuffer>): void;Added
ohos.bluetoothbluetoothon(type: "sppRead", clientSocket: number, callback: Callback<ArrayBuffer>): void;Added
ohos.bluetoothbluetoothsppWrite(clientSocket: number, data: ArrayBuffer): boolean;Added
ohos.bluetoothbluetoothsppCloseClientSocket(socket: number): void;Added
ohos.bluetoothbluetoothsppCloseServerSocket(socket: number): void;Added
ohos.bluetoothbluetoothsppConnect(device: string, option: SppOption, callback: AsyncCallback<number>): void;Added
ohos.bluetoothbluetoothsppAccept(serverSocket: number, callback: AsyncCallback<number>): void;Added
ohos.bluetoothbluetoothsppListen(name: string, option: SppOption, callback: AsyncCallback<number>): void;Added
ohos.bluetoothbluetoothoff(type: "stateChange", callback?: Callback<BluetoothState>): void;Added
ohos.bluetoothbluetoothon(type: "stateChange", callback: Callback<BluetoothState>): void;Added
ohos.bluetoothbluetoothoff(type: "pinRequired", callback?: Callback<PinRequiredParam>): void;Added
ohos.bluetoothbluetoothon(type: "pinRequired", callback: Callback<PinRequiredParam>): void;Added
ohos.bluetoothbluetoothoff(type: "bondStateChange", callback?: Callback<BondStateParam>): void;Added
ohos.bluetoothbluetoothon(type: "bondStateChange", callback: Callback<BondStateParam>): void;Added
ohos.bluetoothbluetoothoff(type: "bluetoothDeviceFind", callback?: Callback<Array<string>>): void;Added
ohos.bluetoothbluetoothon(type: "bluetoothDeviceFind", callback: Callback<Array<string>>): void;Added
ohos.bluetoothbluetoothstopBluetoothDiscovery(): boolean;Added
ohos.bluetoothbluetoothstartBluetoothDiscovery(): boolean;Added
ohos.bluetoothbluetoothgetBluetoothScanMode(): ScanMode;Added
ohos.bluetoothbluetoothsetBluetoothScanMode(mode: ScanMode, duration: number): boolean;Added
ohos.bluetoothbluetoothsetLocalName(name: string): boolean;Added
ohos.bluetoothbluetoothsetDevicePairingConfirmation(device: string, accept: boolean): boolean;Added
ohos.bluetoothbluetoothgetProfileConnState(profileId: ProfileId): ProfileConnectionState;Added
ohos.bluetoothbluetoothgetPairedDevices(): Array<string>;Added
ohos.bluetoothbluetoothgetLocalName(): string;Added
ohos.bluetoothbluetoothdisableBluetooth(): boolean;Added
ohos.bluetoothbluetoothenableBluetooth(): boolean;Added
ohos.bluetoothbluetoothgetRemoteDeviceClass(deviceId: string): DeviceClass;Added
ohos.bluetoothbluetoothgetRemoteDeviceName(deviceId: string): string;Added
ohos.bluetoothbluetoothpairDevice(deviceId: string): boolean;Added
ohos.bluetoothbluetoothgetBtConnectionState(): ProfileConnectionState;Added
ohos.bluetoothbluetoothgetState(): BluetoothState;Added

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)Updates (OpenHarmony 3.1 Beta -> OpenHarmony 3.1 Release)

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 Power Management Subsystem

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/4c633df198f64c44bbdcb609a6b68392