bluetoothCapabilityIsSupport
Requires:
DeviceKit≥2.2.1@ray-js/ray≥0.6.23
Platforms:
iOSAndroid
Method signature
bluetoothCapabilityIsSupport(params: )Minimum SDK versions
- iOS
ThingSmartDeviceKitBizBundle - ≥ 5.2.0
- Android
com.thingclips.smart:thingsmart-bizbundle-devicekit - ≥ 5.2.0
Description
Whether the Bluetooth device supports a given capability. The capability value maps to specific abilities: 0: whether DP is controllable during OTA; 1: whether the gateway and App use low-power online logic for this device; 2: whether it has Beacon capability; 3: whether Bluetooth LINK-layer encryption is enabled; 4: whether extension modules are supported; 5: whether scheduling is supported; 6: whether Bluetooth BT/BLE dual-mode is supported; 7: whether LINK-layer encryption is required
Parameters
| Property | Type | Required | Description | Minimum SDK versions |
|---|---|---|---|---|
deviceId | string | Yes | Device ID | — |
capability | number | Yes | Capability bit flags, consistent with the bluetoothCapabilityIsSupport method description 0: Whether DP is controllable during OTA 1: Whether the gateway and App use low-power online logic for this device 2: Whether Beacon capability is supported 3: Whether Bluetooth LINK-layer encryption is enabled 4: Whether extension modules are supported 5: Whether scheduling is supported 6: Whether Bluetooth BT/BLE dual-mode is supported 7: Whether LINK-layer encryption is mandatory | — |
complete | () => void | No | Completion callback (executed on both success and failure) | — |
success | (params: Object) => void | No | Callback on successful API call | — |
fail | (params: Object) => void | No | Failure callback | — |
success callback parameters
| Property | Type | Description | DeviceKit Since | Minimum SDK versions |
|---|---|---|---|---|
isSupport | boolean | Result callback for whether a Bluetooth-related capability is supported isSupport Whether supported | v3.3.0 | — |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None