Package com.yasee.yasee.core.interfaces
Interface BleInterface
public interface BleInterface
蓝牙 平台管理接口
- 完整的gatt流程hook
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
canUsed()
是不是使用 gatt hook功能void
onCharacteristicsDiscovered
(BleDevice device, UUID serviceUuid, List<BleInterface.BleInterfaceCD> characteristics) 获取到服务内容 hookvoid
onCharacteristicUploadData
(BleDevice device, UUID serviceUuid, UUID characteristicUuid, byte[] data) 上载、通知、等等硬件过来的数据void
onCharacteristicWrite
(BleDevice device, UUID serviceUuid, UUID characteristicUuid, boolean success) 写入是不是成功的hookvoid
onConnectionStateChange
(BleDevice device, boolean connectState) 哪一台设备 连接状态是什么void
onDescriptorWrite
(BleDevice device, UUID characteristicUuid, boolean success) 配置项是不是生效void
onMtuChanged
(BleDevice device, int mtu, boolean success) 配置MTU大小void
onServicesDiscovered
(BleDevice device, List<UUID> serviceUuids) 获取到服务内容 hookvoid
onUpdateNotificationState
(BleDevice device, UUID serviceUuid, UUID characteristicUuid, boolean enable, boolean success) 配置通知是不是OKvoid
onUploadRssi
(BleDevice device, int rssi) 上传rssi
-
Field Details
-
noUsed
静态 接口 不使用 接口
-
-
Method Details
-
canUsed
boolean canUsed()是不是使用 gatt hook功能- Returns:
- the boolean
-
onConnectionStateChange
哪一台设备 连接状态是什么- Parameters:
device
- the deviceconnectState
- the connect state
-
onServicesDiscovered
获取到服务内容 hook- Parameters:
device
- the deviceserviceUuids
- the service uuids
-
onCharacteristicsDiscovered
void onCharacteristicsDiscovered(BleDevice device, UUID serviceUuid, List<BleInterface.BleInterfaceCD> characteristics) 获取到服务内容 hook- Parameters:
device
- the deviceserviceUuid
- the service uuidcharacteristics
- the characteristics
-
onCharacteristicUploadData
void onCharacteristicUploadData(BleDevice device, UUID serviceUuid, UUID characteristicUuid, byte[] data) 上载、通知、等等硬件过来的数据- Parameters:
device
- the deviceserviceUuid
- the service uuidcharacteristicUuid
- the characteristic uuiddata
- the data
-
onCharacteristicWrite
void onCharacteristicWrite(BleDevice device, UUID serviceUuid, UUID characteristicUuid, boolean success) 写入是不是成功的hook- Parameters:
device
- the deviceserviceUuid
- the service uuidcharacteristicUuid
- the characteristic uuidsuccess
- the success
-
onDescriptorWrite
配置项是不是生效- Parameters:
device
- the devicecharacteristicUuid
- the characteristic uuidsuccess
- the success
-
onUploadRssi
上传rssi- Parameters:
device
- the devicerssi
- the rssi
-
onMtuChanged
配置MTU大小- Parameters:
device
- the devicemtu
- the mtusuccess
- the success
-
onUpdateNotificationState
void onUpdateNotificationState(BleDevice device, UUID serviceUuid, UUID characteristicUuid, boolean enable, boolean success) 配置通知是不是OK- Parameters:
device
- the deviceserviceUuid
- the service uuidcharacteristicUuid
- the characteristic uuidenable
- the enablesuccess
- the success
-