openharmony 鸿蒙 js-apidiff-communicate

2022-12-22 浏览 (887)

基础通信子系统JS API变更

OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,基础通信子系统的API变更如下:

接口变更

模块名类名方法/属性/枚举/常量变更类型
tagSessionTagSessiongetMaxSendLength(): number;新增
tagSessionTagSessionsendData(data: number[]): Promise<number[]>;
sendData(data: number[], callback: AsyncCallback<number[]>): void;
新增
tagSessionTagSessiongetSendDataTimeout(): number;新增
tagSessionTagSessionsetSendDataTimeout(timeout: number): boolean;新增
tagSessionTagSessionisTagConnected(): boolean;新增
tagSessionTagSessionreset(): void;新增
tagSessionTagSessionconnectTag(): boolean;新增
tagSessionTagSessiongetTagInfo(): tag.TagInfo;新增
nfctechNfcVTaggetDsfId(): number;新增
nfctechNfcVTaggetResponseFlags(): number;新增
nfctechNfcFTaggetPmm(): number[];新增
nfctechNfcFTaggetSystemCode(): number[];新增
nfctechNfcBTaggetRespProtocol(): number[];新增
nfctechNfcBTaggetRespAppData(): number[];新增
nfctechNfcATaggetAtqa(): number[];新增
nfctechNfcATaggetSak(): number;新增
ohos.wifiextPowerModelTHROUGH_WALL = 2新增
ohos.wifiextPowerModelGENERAL = 1新增
ohos.wifiextPowerModelSLEEPING = 0新增
ohos.wifiextwifiextsetPowerModel(model: PowerModel) : boolean新增
ohos.wifiextwifiextgetPowerModel (): Promise<PowerModel>;
getPowerModel (callback: AsyncCallback<PowerModel>): void;
新增
ohos.wifiextwifiextgetSupportedPowerModel(): Promise<Array<PowerModel>>;
getSupportedPowerModel(callback: AsyncCallback<Array<PowerModel>>): void;
新增
ohos.wifiextwifiextdisableHotspot(): boolean;新增
ohos.wifiextwifiextenableHotspot(): boolean;新增
ohos.wifiGroupOwnerBandGO_BAND_5GHZ = 2新增
ohos.wifiGroupOwnerBandGO_BAND_2GHZ = 1新增
ohos.wifiGroupOwnerBandGO_BAND_AUTO = 0新增
ohos.wifiP2pDeviceStatusUNAVAILABLE = 4新增
ohos.wifiP2pDeviceStatusAVAILABLE = 3新增
ohos.wifiP2pDeviceStatusFAILED = 2新增
ohos.wifiP2pDeviceStatusINVITED = 1新增
ohos.wifiP2pDeviceStatusCONNECTED = 0新增
ohos.wifiWifiP2pLinkedInfogroupOwnerAddr: string;新增
ohos.wifiWifiP2pLinkedInfoisGroupOwner: boolean;新增
ohos.wifiWifiP2pLinkedInfoconnectState: P2pConnectState;新增
ohos.wifiP2pConnectStateCONNECTED = 1新增
ohos.wifiP2pConnectStateDISCONNECTED = 0新增
ohos.wifiWifiP2pGroupInfogoIpAddress: string;新增
ohos.wifiWifiP2pGroupInfoclientDevices: WifiP2pDevice[];新增
ohos.wifiWifiP2pGroupInfofrequency: number;新增
ohos.wifiWifiP2pGroupInfonetworkId: number;新增
ohos.wifiWifiP2pGroupInfogroupName: string;新增
ohos.wifiWifiP2pGroupInfointerface: string;新增
ohos.wifiWifiP2pGroupInfopassphrase: string;新增
ohos.wifiWifiP2pGroupInfoownerInfo: WifiP2pDevice;新增
ohos.wifiWifiP2pGroupInfoisP2pGo: boolean;新增
ohos.wifiWifiP2PConfiggoBand: GroupOwnerBand;新增
ohos.wifiWifiP2PConfiggroupName: string;新增
ohos.wifiWifiP2PConfigpassphrase: string;新增
ohos.wifiWifiP2PConfignetId: number;新增
ohos.wifiWifiP2PConfigdeviceAddress: string;新增
ohos.wifiWifiP2pDevicegroupCapabilitys: number;新增
ohos.wifiWifiP2pDevicedeviceStatus: P2pDeviceStatus;新增
ohos.wifiWifiP2pDeviceprimaryDeviceType: string;新增
ohos.wifiWifiP2pDevicedeviceAddress: string;新增
ohos.wifiWifiP2pDevicedeviceName: string;新增
ohos.wifiConnStateUNKNOWN新增
ohos.wifiConnStateDISCONNECTED新增
ohos.wifiConnStateDISCONNECTING新增
ohos.wifiConnStateCONNECTED新增
ohos.wifiConnStateOBTAINING_IPADDR新增
ohos.wifiConnStateAUTHENTICATING新增
ohos.wifiConnStateCONNECTING新增
ohos.wifiConnStateSCANNING新增
ohos.wifiIpInfoleaseDuration: number;新增
ohos.wifiIpInfoserverIp: number;新增
ohos.wifiIpInfosecondDns: number;新增
ohos.wifiIpInfoprimaryDns: number;新增
ohos.wifiIpInfonetmask: number;新增
ohos.wifiIpInfogateway: number;新增
ohos.wifiIpInfoipAddress: number;新增
ohos.wifiWifiLinkedInfoconnState: ConnState;新增
ohos.wifiWifiLinkedInfoipAddress: number;新增
ohos.wifiWifiLinkedInfomacAddress: string;新增
ohos.wifiWifiLinkedInfoisRestricted: boolean;新增
ohos.wifiWifiLinkedInfoisHidden: boolean;新增
ohos.wifiWifiLinkedInfofrequency: number;新增
ohos.wifiWifiLinkedInfolinkSpeed: number;新增
ohos.wifiWifiLinkedInfoband: number;新增
ohos.wifiWifiLinkedInforssi: number;新增
ohos.wifiWifiLinkedInfobssid: string;新增
ohos.wifiWifiLinkedInfossid: string;新增
ohos.wifiWifiScanInfochannelWidth: number;新增
ohos.wifiWifiScanInfocapabilities: string;新增
ohos.wifiwifioff(type: "p2pDiscoveryChange", callback?: Callback<number>): void;新增
ohos.wifiwifion(type: "p2pDiscoveryChange", callback: Callback<number>): void;新增
ohos.wifiwifioff(type: "p2pPersistentGroupChange", callback?: Callback<void>): void;新增
ohos.wifiwifion(type: "p2pPersistentGroupChange", callback: Callback<void>): void;新增
ohos.wifiwifioff(type: "p2pPeerDeviceChange", callback?: Callback<WifiP2pDevice[]>): void;新增
ohos.wifiwifion(type: "p2pPeerDeviceChange", callback: Callback<WifiP2pDevice[]>): void;新增
ohos.wifiwifioff(type: "p2pDeviceChange", callback?: Callback<WifiP2pDevice>): void;新增
ohos.wifiwifion(type: "p2pDeviceChange", callback: Callback<WifiP2pDevice>): void;新增
ohos.wifiwifioff(type: "p2pConnectionChange", callback?: Callback<WifiP2pLinkedInfo>): void;新增
ohos.wifiwifion(type: "p2pConnectionChange", callback: Callback<WifiP2pLinkedInfo>): void;新增
ohos.wifiwifioff(type: "p2pStateChange", callback?: Callback<number>): void;新增
ohos.wifiwifion(type: "p2pStateChange", callback: Callback<number>): void;新增
ohos.wifiwifioff(type: "hotspotStateChange", callback?: Callback<number>): void;新增
ohos.wifiwifion(type: "hotspotStateChange", callback: Callback<number>): void;新增
ohos.wifiwifioff(type: "wifiRssiChange", callback?: Callback<number>): void;新增
ohos.wifiwifion(type: "wifiRssiChange", callback: Callback<number>): void;新增
ohos.wifiwifioff(type: "wifiScanStateChange", callback?: Callback<number>): void;新增
ohos.wifiwifion(type: "wifiScanStateChange", callback: Callback<number>): void;新增
ohos.wifiwifioff(type: "wifiConnectionChange", callback?: Callback<number>): void;新增
ohos.wifiwifion(type: "wifiConnectionChange", callback: Callback<number>): void;新增
ohos.wifiwifioff(type: "wifiStateChange", callback?: Callback<number>): void;新增
ohos.wifiwifion(type: "wifiStateChange", callback: Callback<number>): void;新增
ohos.wifiwifistopDiscoverDevices(): boolean;新增
ohos.wifiwifistartDiscoverDevices(): boolean;新增
ohos.wifiwifip2pCancelConnect(): boolean;新增
ohos.wifiwifip2pConnect(config: WifiP2PConfig): boolean;新增
ohos.wifiwifiremoveGroup(): boolean;新增
ohos.wifiwificreateGroup(config: WifiP2PConfig): boolean;新增
ohos.wifiwifigetP2pPeerDevices(): Promise<WifiP2pDevice[]>;
getP2pPeerDevices(callback: AsyncCallback<WifiP2pDevice[]>): void;
新增
ohos.wifiwifigetCurrentGroup(): Promise<WifiP2pGroupInfo>;
getCurrentGroup(callback: AsyncCallback<WifiP2pGroupInfo>): void;
新增
ohos.wifiwifigetP2pLinkedInfo(): Promise<WifiP2pLinkedInfo>;
getP2pLinkedInfo(callback: AsyncCallback<WifiP2pLinkedInfo>): void;
新增
ohos.wifiwifigetCountryCode(): string;新增
ohos.wifiwifigetIpInfo(): IpInfo;新增
ohos.wifiwifiisFeatureSupported(featureId: number): boolean;新增
ohos.wifiwifiisConnected(): boolean;新增
ohos.wifiwifigetLinkedInfo(): Promise<WifiLinkedInfo>;
getLinkedInfo(callback: AsyncCallback<WifiLinkedInfo>): void;
新增
ohos.wifiwifiremoveUntrustedConfig(config: WifiDeviceConfig): Promise<boolean>;
removeUntrustedConfig(config: WifiDeviceConfig, callback: AsyncCallback<boolean>): void;
新增
ohos.wifiwifiaddUntrustedConfig(config: WifiDeviceConfig): Promise<boolean>;
addUntrustedConfig(config: WifiDeviceConfig, callback: AsyncCallback<boolean>): void;
新增
ohos.nfc.tagTagInfosupportedProfiles: number[];新增
ohos.nfc.tagtaggetNfcVTag(tagInfo: TagInfo): NfcVTag新增
ohos.nfc.tagtaggetNfcFTag(tagInfo: TagInfo): NfcFTag新增
ohos.nfc.tagtaggetNfcBTag(tagInfo: TagInfo): NfcBTag新增
ohos.nfc.tagtaggetNfcATag(tagInfo: TagInfo): NfcATag新增
ohos.nfc.tagtagconst MIFARE_ULTRALIGHT = 9;新增
ohos.nfc.tagtagconst MIFARE_CLASSIC = 8;新增
ohos.nfc.tagtagconst NDEF = 6;新增
ohos.nfc.tagtagconst NFC_V = 5;新增
ohos.nfc.tagtagconst NFC_F = 4;新增
ohos.nfc.tagtagconst ISO_DEP = 3;新增
ohos.nfc.tagtagconst NFC_B = 2;新增
ohos.nfc.tagtagconst NFC_A = 1;新增
ohos.nfc.controllernfcControllergetNfcState(): NfcState新增
ohos.nfc.controllernfcControllerisNfcOpen(): boolean新增
ohos.nfc.controllernfcControllercloseNfc(): boolean新增
ohos.nfc.controllernfcControlleropenNfc(): boolean新增
ohos.nfc.controllernfcControlleroff(type: "nfcStateChange", callback?: Callback<NfcState>): void新增
ohos.nfc.controllernfcControlleron(type: "nfcStateChange", callback: Callback<NfcState>): void新增
ohos.nfc.controllernfcControllerisNfcAvailable(): boolean新增
ohos.nfc.controllerNfcStateSTATE_TURNING_OFF = 4新增
ohos.nfc.controllerNfcStateSTATE_ON = 3新增
ohos.nfc.controllerNfcStateSTATE_TURNING_ON = 2新增
ohos.nfc.controllerNfcStateSTATE_OFF = 1新增
ohos.nfc.cardEmulationHceServicesendResponse(responseApdu: number[]): void;新增
ohos.nfc.cardEmulationHceServiceon(type: "hceCmd", callback: AsyncCallback<number[]>): void;新增
ohos.nfc.cardEmulationHceServicestopHCE(): boolean;新增
ohos.nfc.cardEmulationHceServicestartHCE(aidList: string[]): boolean;新增
ohos.nfc.cardEmulationcardEmulationisSupported(feature: number): boolean;新增
ohos.nfc.cardEmulationFeatureTypeESE = 2新增
ohos.nfc.cardEmulationFeatureTypeUICC = 1新增
ohos.nfc.cardEmulationFeatureTypeHCE = 0新增
ohos.connectedTagNfcRfTypeNFC_RF_ENTER = 1新增
ohos.connectedTagNfcRfTypeNFC_RF_LEAVE = 0新增
ohos.connectedTagconnectedTagoff(type: "notify", callback?:Callback<number>): void;新增
ohos.connectedTagconnectedTagon(type: "notify", callback: Callback<number>): void;新增
ohos.connectedTagconnectedTagwriteNdefTag(data: string): Promise<void>;
writeNdefTag(data: string, callback: AsyncCallback<void>): void;
新增
ohos.connectedTagconnectedTagreadNdefTag(): Promise<string>;
readNdefTag(callback: AsyncCallback<string>): void;
新增
ohos.connectedTagconnectedTaguninit(): boolean;新增
ohos.connectedTagconnectedTaginit(): boolean;新增
ohos.bluetoothProfileIdPROFILE_HANDS_FREE_AUDIO_GATEWAY = 4新增
ohos.bluetoothProfileIdPROFILE_A2DP_SOURCE = 1新增
ohos.bluetoothPlayingStateSTATE_PLAYING新增
ohos.bluetoothPlayingStateSTATE_NOT_PLAYING新增
ohos.bluetoothStateChangeParamstate: ProfileConnectionState;新增
ohos.bluetoothStateChangeParamdeviceId: string;新增
ohos.bluetoothMajorMinorClassHEALTH_PERSONAL_MOBILITY_DEVICE = 0x093C新增
ohos.bluetoothMajorMinorClassHEALTH_GENERIC_HEALTH_MANAGER = 0x0938新增
ohos.bluetoothMajorMinorClassHEALTH_ANKLE_PROSTHESIS = 0x0934新增
ohos.bluetoothMajorMinorClassHEALTH_KNEE_PROSTHESIS = 0x0930新增
ohos.bluetoothMajorMinorClassHEALTH_MEDICATION_MONITOR = 0x092C新增
ohos.bluetoothMajorMinorClassHEALTH_PEAK_FLOW_MOITOR = 0x0928新增
ohos.bluetoothMajorMinorClassHEALTH_BODY_COMPOSITION_ANALYZER = 0x0924新增
ohos.bluetoothMajorMinorClassHEALTH_STEP_COUNTER = 0x0920新增
ohos.bluetoothMajorMinorClassHEALTH_DATA_DISPLAY = 0x091C新增
ohos.bluetoothMajorMinorClassHEALTH_PULSE_RATE = 0x0918新增
ohos.bluetoothMajorMinorClassHEALTH_PULSE_OXIMETER = 0x0914新增
ohos.bluetoothMajorMinorClassHEALTH_GLUCOSE = 0x0910新增
ohos.bluetoothMajorMinorClassHEALTH_WEIGHING = 0x090C新增
ohos.bluetoothMajorMinorClassHEALTH_THERMOMETER = 0x0908新增
ohos.bluetoothMajorMinorClassHEALTH_BLOOD_PRESSURE = 0x0904新增
ohos.bluetoothMajorMinorClassHEALTH_UNCATEGORIZED = 0x0900新增
ohos.bluetoothMajorMinorClassTOY_GAME = 0x0814新增
ohos.bluetoothMajorMinorClassTOY_CONTROLLER = 0x0810新增
ohos.bluetoothMajorMinorClassTOY_DOLL_ACTION_FIGURE = 0x080C新增
ohos.bluetoothMajorMinorClassTOY_VEHICLE = 0x0808新增
ohos.bluetoothMajorMinorClassTOY_ROBOT = 0x0804新增
ohos.bluetoothMajorMinorClassTOY_UNCATEGORIZED = 0x0800新增
ohos.bluetoothMajorMinorClassWEARABLE_GLASSES = 0x0714新增
ohos.bluetoothMajorMinorClassWEARABLE_HELMET = 0x0710新增
ohos.bluetoothMajorMinorClassWEARABLE_JACKET = 0x070C新增
ohos.bluetoothMajorMinorClassWEARABLE_PAGER = 0x0708新增
ohos.bluetoothMajorMinorClassWEARABLE_WRIST_WATCH = 0x0704新增
ohos.bluetoothMajorMinorClassWEARABLE_UNCATEGORIZED = 0x0700新增
ohos.bluetoothMajorMinorClassIMAGING_PRINTER = 0x0680新增
ohos.bluetoothMajorMinorClassIMAGING_SCANNER = 0x0640新增
ohos.bluetoothMajorMinorClassIMAGING_CAMERA = 0x0620新增
ohos.bluetoothMajorMinorClassIMAGING_DISPLAY = 0x0610新增
ohos.bluetoothMajorMinorClassIMAGING_UNCATEGORIZED = 0x0600新增
ohos.bluetoothMajorMinorClassPERIPHERAL_GESTURAL_INPUT = 0x0522新增
ohos.bluetoothMajorMinorClassPERIPHERAL_SCANNER_RFID = 0x0520新增
ohos.bluetoothMajorMinorClassPERIPHERAL_DIGITAL_PEN = 0x051C新增
ohos.bluetoothMajorMinorClassPERIPHERAL_CARD_READER = 0x0518新增
ohos.bluetoothMajorMinorClassPERIPHERAL_DIGITIZER_TABLET = 0x0514新增
ohos.bluetoothMajorMinorClassPERIPHERAL_SENSING_DEVICE = 0x0510新增
ohos.bluetoothMajorMinorClassPERIPHERAL_REMOTE_CONTROL = 0x05C0新增
ohos.bluetoothMajorMinorClassPERIPHERAL_GAMEPAD = 0x0508新增
ohos.bluetoothMajorMinorClassPERIPHERAL_JOYSTICK = 0x0504新增
ohos.bluetoothMajorMinorClassPERIPHERAL_UNCATEGORIZED = 0x0500新增
ohos.bluetoothMajorMinorClassPERIPHERAL_KEYBOARD_POINTING = 0x05C0新增
ohos.bluetoothMajorMinorClassPERIPHERAL_POINTING_DEVICE = 0x0580新增
ohos.bluetoothMajorMinorClassPERIPHERAL_KEYBOARD = 0x0540新增
ohos.bluetoothMajorMinorClassPERIPHERAL_NON_KEYBOARD_NON_POINTING = 0x0500新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VIDEO_GAMING_TOY = 0x0448新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VIDEO_CONFERENCING = 0x0440新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER = 0x043C新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VIDEO_MONITOR = 0x0438新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_CAMCORDER = 0x0434新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VIDEO_CAMERA = 0x0430新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_VCR = 0x042C新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_HIFI_AUDIO = 0x0428新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_SET_TOP_BOX = 0x0424新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_CAR_AUDIO = 0x0420新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_PORTABLE_AUDIO = 0x041C新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_HEADPHONES = 0x0418新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_LOUDSPEAKER = 0x0414新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_MICROPHONE = 0x0410新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_HANDSFREE = 0x0408新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_WEARABLE_HEADSET = 0x0404新增
ohos.bluetoothMajorMinorClassAUDIO_VIDEO_UNCATEGORIZED = 0x0400新增
ohos.bluetoothMajorMinorClassNETWORK_NO_SERVICE = 0x03E0新增
ohos.bluetoothMajorMinorClassNETWORK_83_TO_99_UTILIZED = 0x03C0新增
ohos.bluetoothMajorMinorClassNETWORK_67_TO_83_UTILIZED = 0x03A0新增
ohos.bluetoothMajorMinorClassNETWORK_60_TO_67_UTILIZED = 0x0380新增
ohos.bluetoothMajorMinorClassNETWORK_33_TO_50_UTILIZED = 0x0360新增
ohos.bluetoothMajorMinorClassNETWORK_17_TO_33_UTILIZED = 0x0340新增
ohos.bluetoothMajorMinorClassNETWORK_1_TO_17_UTILIZED = 0x0320新增
ohos.bluetoothMajorMinorClassNETWORK_FULLY_AVAILABLE = 0x0300新增
ohos.bluetoothMajorMinorClassPHONE_ISDN = 0x0214新增
ohos.bluetoothMajorMinorClassPHONE_MODEM_OR_GATEWAY = 0x0210新增
ohos.bluetoothMajorMinorClassPHONE_SMART = 0x020C新增
ohos.bluetoothMajorMinorClassPHONE_CORDLESS = 0x0208新增
ohos.bluetoothMajorMinorClassPHONE_CELLULAR = 0x0204新增
ohos.bluetoothMajorMinorClassPHONE_UNCATEGORIZED = 0x0200新增
ohos.bluetoothMajorMinorClassCOMPUTER_TABLET = 0x011C新增
ohos.bluetoothMajorMinorClassCOMPUTER_WEARABLE = 0x0118新增
ohos.bluetoothMajorMinorClassCOMPUTER_PALM_SIZE_PC_PDA = 0x0114新增
ohos.bluetoothMajorMinorClassCOMPUTER_HANDHELD_PC_PDA = 0x0110新增
ohos.bluetoothMajorMinorClassCOMPUTER_LAPTOP = 0x010C新增
ohos.bluetoothMajorMinorClassCOMPUTER_SERVER = 0x0108新增
ohos.bluetoothMajorMinorClassCOMPUTER_DESKTOP = 0x0104新增
ohos.bluetoothMajorMinorClassCOMPUTER_UNCATEGORIZED = 0x0100新增
ohos.bluetoothMajorClassMAJOR_UNCATEGORIZED = 0x1F00新增
ohos.bluetoothMajorClassMAJOR_HEALTH = 0x0900新增
ohos.bluetoothMajorClassMAJOR_TOY = 0x0800新增
ohos.bluetoothMajorClassMAJOR_WEARABLE = 0x0700新增
ohos.bluetoothMajorClassMAJOR_IMAGING = 0x0600新增
ohos.bluetoothMajorClassMAJOR_PERIPHERAL = 0x0500新增
ohos.bluetoothMajorClassMAJOR_AUDIO_VIDEO = 0x0400新增
ohos.bluetoothMajorClassMAJOR_NETWORKING = 0x0300新增
ohos.bluetoothMajorClassMAJOR_PHONE = 0x0200新增
ohos.bluetoothMajorClassMAJOR_COMPUTER = 0x0100新增
ohos.bluetoothMajorClassMAJOR_MISC = 0x0000新增
ohos.bluetoothBondStateBOND_STATE_BONDED = 2新增
ohos.bluetoothBondStateBOND_STATE_BONDING = 1新增
ohos.bluetoothBondStateBOND_STATE_INVALID = 0新增
ohos.bluetoothScanModeSCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE = 5新增
ohos.bluetoothScanModeSCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE = 4新增
ohos.bluetoothScanModeSCAN_MODE_LIMITED_DISCOVERABLE = 3新增
ohos.bluetoothScanModeSCAN_MODE_GENERAL_DISCOVERABLE = 2新增
ohos.bluetoothScanModeSCAN_MODE_CONNECTABLE = 1新增
ohos.bluetoothScanModeSCAN_MODE_NONE = 0新增
ohos.bluetoothSppTypeSPP_RFCOMM新增
ohos.bluetoothBluetoothStateSTATE_BLE_TURNING_OFF = 6新增
ohos.bluetoothBluetoothStateSTATE_BLE_ON = 5新增
ohos.bluetoothBluetoothStateSTATE_BLE_TURNING_ON = 4新增
ohos.bluetoothBluetoothStateSTATE_TURNING_OFF = 3新增
ohos.bluetoothBluetoothStateSTATE_ON = 2新增
ohos.bluetoothBluetoothStateSTATE_TURNING_ON = 1新增
ohos.bluetoothBluetoothStateSTATE_OFF = 0新增
ohos.bluetoothProfileConnectionStateSTATE_DISCONNECTING = 3新增
ohos.bluetoothProfileConnectionStateSTATE_CONNECTED = 2新增
ohos.bluetoothProfileConnectionStateSTATE_CONNECTING = 1新增
ohos.bluetoothProfileConnectionStateSTATE_DISCONNECTED = 0新增
ohos.bluetoothMatchModeMATCH_MODE_STICKY = 2新增
ohos.bluetoothMatchModeMATCH_MODE_AGGRESSIVE = 1新增
ohos.bluetoothScanDutySCAN_MODE_LOW_LATENCY = 2新增
ohos.bluetoothScanDutySCAN_MODE_BALANCED = 1新增
ohos.bluetoothScanDutySCAN_MODE_LOW_POWER = 0新增
ohos.bluetoothBondStateParamstate: BondState;新增
ohos.bluetoothBondStateParamdeviceId: string;新增
ohos.bluetoothDeviceClassclassOfDevice: number;新增
ohos.bluetoothDeviceClassmajorMinorClass: MajorMinorClass;新增
ohos.bluetoothDeviceClassmajorClass: MajorClass;新增
ohos.bluetoothPinRequiredParampinCode: string;新增
ohos.bluetoothPinRequiredParamdeviceId: string;新增
ohos.bluetoothSppOptiontype: SppType;新增
ohos.bluetoothSppOptionsecure: boolean;新增
ohos.bluetoothSppOptionuuid: string;新增
ohos.bluetoothScanOptionsmatchMode?: MatchMode;新增
ohos.bluetoothScanOptionsdutyMode?: ScanDuty;新增
ohos.bluetoothScanOptionsinterval?: number;新增
ohos.bluetoothScanFilterserviceUuid?: string;新增
ohos.bluetoothScanFiltername?: string;新增
ohos.bluetoothScanFilterdeviceId?: string;新增
ohos.bluetoothServiceDataserviceValue: ArrayBuffer;新增
ohos.bluetoothServiceDataserviceUuid: string;新增
ohos.bluetoothManufactureDatamanufactureValue: ArrayBuffer;新增
ohos.bluetoothManufactureDatamanufactureId: number;新增
ohos.bluetoothAdvertiseDataserviceData: Array<ServiceData>;新增
ohos.bluetoothAdvertiseDatamanufactureData: Array<ManufactureData>;新增
ohos.bluetoothAdvertiseDataserviceUuids: Array<string>;新增
ohos.bluetoothAdvertiseSettingconnectable?: boolean;新增
ohos.bluetoothAdvertiseSettingtxPower?: number;新增
ohos.bluetoothAdvertiseSettinginterval?: number;新增
ohos.bluetoothScanResultdata: ArrayBuffer;新增
ohos.bluetoothScanResultrssi: number;新增
ohos.bluetoothScanResultdeviceId: string;新增
ohos.bluetoothBLEConnectChangedStatestate: ProfileConnectionState;新增
ohos.bluetoothBLEConnectChangedStatedeviceId: string;新增
ohos.bluetoothServerResponsevalue: ArrayBuffer;新增
ohos.bluetoothServerResponseoffset: number;新增
ohos.bluetoothServerResponsestatus: number;新增
ohos.bluetoothServerResponsetransId: number;新增
ohos.bluetoothServerResponsedeviceId: string;新增
ohos.bluetoothDescriptorWriteReqserviceUuid: string;新增
ohos.bluetoothDescriptorWriteReqcharacteristicUuid: string;新增
ohos.bluetoothDescriptorWriteReqdescriptorUuid: string;新增
ohos.bluetoothDescriptorWriteReqvalue: ArrayBuffer;新增
ohos.bluetoothDescriptorWriteReqneedRsp: boolean;新增
ohos.bluetoothDescriptorWriteReqisPrep: boolean;新增
ohos.bluetoothDescriptorWriteReqoffset: number;新增
ohos.bluetoothDescriptorWriteReqtransId: number;新增
ohos.bluetoothDescriptorWriteReqdeviceId: string;新增
ohos.bluetoothDescriptorReadReqserviceUuid: string;新增
ohos.bluetoothDescriptorReadReqcharacteristicUuid: string;新增
ohos.bluetoothDescriptorReadReqdescriptorUuid: string;新增
ohos.bluetoothDescriptorReadReqoffset: number;新增
ohos.bluetoothDescriptorReadReqtransId: number;新增
ohos.bluetoothDescriptorReadReqdeviceId: string;新增
ohos.bluetoothCharacteristicWriteReqserviceUuid: string;新增
ohos.bluetoothCharacteristicWriteReqcharacteristicUuid: string;新增
ohos.bluetoothCharacteristicWriteReqvalue: ArrayBuffer;新增
ohos.bluetoothCharacteristicWriteReqneedRsp: boolean;新增
ohos.bluetoothCharacteristicWriteReqisPrep: boolean;新增
ohos.bluetoothCharacteristicWriteReqoffset: number;新增
ohos.bluetoothCharacteristicWriteReqtransId: number;新增
ohos.bluetoothCharacteristicWriteReqdeviceId: string;新增
ohos.bluetoothCharacteristicReadReqserviceUuid: string;新增
ohos.bluetoothCharacteristicReadReqcharacteristicUuid: string;新增
ohos.bluetoothCharacteristicReadReqoffset: number;新增
ohos.bluetoothCharacteristicReadReqtransId: number;新增
ohos.bluetoothCharacteristicReadReqdeviceId: string;新增
ohos.bluetoothNotifyCharacteristicconfirm: boolean;新增
ohos.bluetoothNotifyCharacteristiccharacteristicValue: ArrayBuffer;新增
ohos.bluetoothNotifyCharacteristiccharacteristicUuid: string;新增
ohos.bluetoothNotifyCharacteristicserviceUuid: string;新增
ohos.bluetoothBLEDescriptordescriptorValue: ArrayBuffer;新增
ohos.bluetoothBLEDescriptordescriptorUuid: string;新增
ohos.bluetoothBLEDescriptorcharacteristicUuid: string;新增
ohos.bluetoothBLEDescriptorserviceUuid: string;新增
ohos.bluetoothBLECharacteristicdescriptors: Array<BLEDescriptor>;新增
ohos.bluetoothBLECharacteristiccharacteristicValue: ArrayBuffer;新增
ohos.bluetoothBLECharacteristiccharacteristicUuid: string;新增
ohos.bluetoothBLECharacteristicserviceUuid: string;新增
ohos.bluetoothGattServiceincludeServices?: Array<GattService>;新增
ohos.bluetoothGattServicecharacteristics: Array<BLECharacteristic>;新增
ohos.bluetoothGattServiceisPrimary: boolean;新增
ohos.bluetoothGattServiceserviceUuid: string;新增
ohos.bluetoothGattClientDeviceoff(type: "BLEConnectionStateChange", callback?: Callback<BLEConnectChangedState>): void;新增
ohos.bluetoothGattClientDeviceon(type: "BLEConnectionStateChange", callback: Callback<BLEConnectChangedState>): void;新增
ohos.bluetoothGattClientDeviceoff(type: "BLECharacteristicChange", callback?: Callback<BLECharacteristic>): void;新增
ohos.bluetoothGattClientDeviceon(type: "BLECharacteristicChange", callback: Callback<BLECharacteristic>): void;新增
ohos.bluetoothGattClientDevicesetNotifyCharacteristicChanged(characteristic: BLECharacteristic, enable: boolean): boolean;新增
ohos.bluetoothGattClientDevicesetBLEMtuSize(mtu: number): boolean;新增
ohos.bluetoothGattClientDevicegetRssiValue(callback: AsyncCallback<number>): void;
getRssiValue(): Promise<number>;
新增
ohos.bluetoothGattClientDevicewriteDescriptorValue(descriptor: BLEDescriptor): boolean;新增
ohos.bluetoothGattClientDevicewriteCharacteristicValue(characteristic: BLECharacteristic): boolean;新增
ohos.bluetoothGattClientDevicereadDescriptorValue(descriptor: BLEDescriptor, callback: AsyncCallback<BLEDescriptor>): void;
readDescriptorValue(descriptor: BLEDescriptor): Promise<BLEDescriptor>;
新增
ohos.bluetoothGattClientDevicereadCharacteristicValue(characteristic: BLECharacteristic, callback: AsyncCallback<BLECharacteristic>): void;
readCharacteristicValue(characteristic: BLECharacteristic): Promise<BLECharacteristic>;
新增
ohos.bluetoothGattClientDevicegetServices(callback: AsyncCallback<Array<GattService>>): void;
getServices(): Promise<Array<GattService>>;
新增
ohos.bluetoothGattClientDevicegetDeviceName(callback: AsyncCallback<string>): void;
getDeviceName(): Promise<string>;
新增
ohos.bluetoothGattClientDeviceclose(): boolean;新增
ohos.bluetoothGattClientDevicedisconnect(): boolean;新增
ohos.bluetoothGattClientDeviceconnect(): boolean;新增
ohos.bluetoothGattServeroff(type: "connectStateChange", callback?: Callback<BLEConnectChangedState>): void;新增
ohos.bluetoothGattServeron(type: "connectStateChange", callback: Callback<BLEConnectChangedState>): void;新增
ohos.bluetoothGattServeroff(type: "descriptorWrite", callback?: Callback<DescriptorWriteReq>): void;新增
ohos.bluetoothGattServeron(type: "descriptorWrite", callback: Callback<DescriptorWriteReq>): void;新增
ohos.bluetoothGattServeroff(type: "descriptorRead", callback?: Callback<DescriptorReadReq>): void;新增
ohos.bluetoothGattServeron(type: "descriptorRead", callback: Callback<DescriptorReadReq>): void;新增
ohos.bluetoothGattServeroff(type: "characteristicWrite", callback?: Callback<CharacteristicWriteReq>): void;新增
ohos.bluetoothGattServeron(type: "characteristicWrite", callback: Callback<CharacteristicWriteReq>): void;新增
ohos.bluetoothGattServeroff(type: "characteristicRead", callback?: Callback<CharacteristicReadReq>): void;新增
ohos.bluetoothGattServeron(type: "characteristicRead", callback: Callback<CharacteristicReadReq>): void;新增
ohos.bluetoothGattServersendResponse(serverResponse: ServerResponse): boolean;新增
ohos.bluetoothGattServernotifyCharacteristicChanged(deviceId: string, notifyCharacteristic: NotifyCharacteristic): boolean;新增
ohos.bluetoothGattServerclose(): void;新增
ohos.bluetoothGattServerremoveService(serviceUuid: string): boolean;新增
ohos.bluetoothGattServeraddService(service: GattService): boolean;新增
ohos.bluetoothGattServerstopAdvertising(): void;新增
ohos.bluetoothGattServerstartAdvertising(setting: AdvertiseSetting, advData: AdvertiseData, advResponse?: AdvertiseData): void;新增
ohos.bluetoothBLEoff(type: "BLEDeviceFind", callback?: Callback<Array<ScanResult>>): void;新增
ohos.bluetoothBLEon(type: "BLEDeviceFind", callback: Callback<Array<ScanResult>>): void;新增
ohos.bluetoothBLEstopBLEScan(): void;新增
ohos.bluetoothBLEstartBLEScan(filters: Array<ScanFilter>, options?: ScanOptions): void;新增
ohos.bluetoothBLEgetConnectedBLEDevices(): Array<string>;新增
ohos.bluetoothBLEcreateGattClientDevice(deviceId: string): GattClientDevice;新增
ohos.bluetoothBLEcreateGattServer(): GattServer;新增
ohos.bluetoothHandsFreeAudioGatewayProfileoff(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void;新增
ohos.bluetoothHandsFreeAudioGatewayProfileon(type: "connectionStateChange", callback: Callback<StateChangeParam>): void;新增
ohos.bluetoothHandsFreeAudioGatewayProfiledisconnect(device: string): boolean;新增
ohos.bluetoothHandsFreeAudioGatewayProfileconnect(device: string): boolean;新增
ohos.bluetoothA2dpSourceProfilegetPlayingState(device: string): PlayingState;新增
ohos.bluetoothA2dpSourceProfileoff(type: "connectionStateChange", callback?: Callback<StateChangeParam>): void;新增
ohos.bluetoothA2dpSourceProfileon(type: "connectionStateChange", callback: Callback<StateChangeParam>): void;新增
ohos.bluetoothA2dpSourceProfiledisconnect(device: string): boolean;新增
ohos.bluetoothA2dpSourceProfileconnect(device: string): boolean;新增
ohos.bluetoothBaseProfilegetDeviceState(device: string): ProfileConnectionState;新增
ohos.bluetoothBaseProfilegetConnectionDevices(): Array<string>;新增
ohos.bluetoothbluetoothgetProfile(profileId: ProfileId): A2dpSourceProfile |HandsFreeAudioGatewayProfile;新增
ohos.bluetoothbluetoothoff(type: "sppRead", clientSocket: number, callback?: Callback<ArrayBuffer>): void;新增
ohos.bluetoothbluetoothon(type: "sppRead", clientSocket: number, callback: Callback<ArrayBuffer>): void;新增
ohos.bluetoothbluetoothsppWrite(clientSocket: number, data: ArrayBuffer): boolean;新增
ohos.bluetoothbluetoothsppCloseClientSocket(socket: number): void;新增
ohos.bluetoothbluetoothsppCloseServerSocket(socket: number): void;新增
ohos.bluetoothbluetoothsppConnect(device: string, option: SppOption, callback: AsyncCallback<number>): void;新增
ohos.bluetoothbluetoothsppAccept(serverSocket: number, callback: AsyncCallback<number>): void;新增
ohos.bluetoothbluetoothsppListen(name: string, option: SppOption, callback: AsyncCallback<number>): void;新增
ohos.bluetoothbluetoothoff(type: "stateChange", callback?: Callback<BluetoothState>): void;新增
ohos.bluetoothbluetoothon(type: "stateChange", callback: Callback<BluetoothState>): void;新增
ohos.bluetoothbluetoothoff(type: "pinRequired", callback?: Callback<PinRequiredParam>): void;新增
ohos.bluetoothbluetoothon(type: "pinRequired", callback: Callback<PinRequiredParam>): void;新增
ohos.bluetoothbluetoothoff(type: "bondStateChange", callback?: Callback<BondStateParam>): void;新增
ohos.bluetoothbluetoothon(type: "bondStateChange", callback: Callback<BondStateParam>): void;新增
ohos.bluetoothbluetoothoff(type: "bluetoothDeviceFind", callback?: Callback<Array<string>>): void;新增
ohos.bluetoothbluetoothon(type: "bluetoothDeviceFind", callback: Callback<Array<string>>): void;新增
ohos.bluetoothbluetoothstopBluetoothDiscovery(): boolean;新增
ohos.bluetoothbluetoothstartBluetoothDiscovery(): boolean;新增
ohos.bluetoothbluetoothgetBluetoothScanMode(): ScanMode;新增
ohos.bluetoothbluetoothsetBluetoothScanMode(mode: ScanMode, duration: number): boolean;新增
ohos.bluetoothbluetoothsetLocalName(name: string): boolean;新增
ohos.bluetoothbluetoothsetDevicePairingConfirmation(device: string, accept: boolean): boolean;新增
ohos.bluetoothbluetoothgetProfileConnState(profileId: ProfileId): ProfileConnectionState;新增
ohos.bluetoothbluetoothgetPairedDevices(): Array<string>;新增
ohos.bluetoothbluetoothgetLocalName(): string;新增
ohos.bluetoothbluetoothdisableBluetooth(): boolean;新增
ohos.bluetoothbluetoothenableBluetooth(): boolean;新增
ohos.bluetoothbluetoothgetRemoteDeviceClass(deviceId: string): DeviceClass;新增
ohos.bluetoothbluetoothgetRemoteDeviceName(deviceId: string): string;新增
ohos.bluetoothbluetoothpairDevice(deviceId: string): boolean;新增
ohos.bluetoothbluetoothgetBtConnectionState(): ProfileConnectionState;新增
ohos.bluetoothbluetoothgetState(): BluetoothState;新增

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Readme

harmony 鸿蒙元能力子系统JS API变更

harmony 鸿蒙元能力子系统JS API变更

harmony 鸿蒙无障碍子系统JS API变更

harmony 鸿蒙帐号子系统JS API变更

harmony 鸿蒙ArkUI子系统JS API变更

harmony 鸿蒙电源服务子系统JS API变更

harmony 鸿蒙包管理子系统JS API变更

harmony 鸿蒙包管理子系统JS API变更

harmony 鸿蒙公共基础库子系统JS API变更

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