Interface BleInterface


public interface BleInterface
蓝牙 平台管理接口
    完整的gatt流程hook
  • Field Details

    • noUsed

      static final BleInterface noUsed
      静态 接口 不使用 接口
  • Method Details

    • canUsed

      boolean canUsed()
      是不是使用 gatt hook功能
      Returns:
      the boolean
    • onConnectionStateChange

      void onConnectionStateChange(BleDevice device, boolean connectState)
      哪一台设备 连接状态是什么
      Parameters:
      device - the device
      connectState - the connect state
    • onServicesDiscovered

      void onServicesDiscovered(BleDevice device, List<UUID> serviceUuids)
      获取到服务内容 hook
      Parameters:
      device - the device
      serviceUuids - the service uuids
    • onCharacteristicsDiscovered

      void onCharacteristicsDiscovered(BleDevice device, UUID serviceUuid, List<BleInterface.BleInterfaceCD> characteristics)
      获取到服务内容 hook
      Parameters:
      device - the device
      serviceUuid - the service uuid
      characteristics - the characteristics
    • onCharacteristicUploadData

      void onCharacteristicUploadData(BleDevice device, UUID serviceUuid, UUID characteristicUuid, byte[] data)
      上载、通知、等等硬件过来的数据
      Parameters:
      device - the device
      serviceUuid - the service uuid
      characteristicUuid - the characteristic uuid
      data - the data
    • onCharacteristicWrite

      void onCharacteristicWrite(BleDevice device, UUID serviceUuid, UUID characteristicUuid, boolean success)
      写入是不是成功的hook
      Parameters:
      device - the device
      serviceUuid - the service uuid
      characteristicUuid - the characteristic uuid
      success - the success
    • onDescriptorWrite

      void onDescriptorWrite(BleDevice device, UUID characteristicUuid, boolean success)
      配置项是不是生效
      Parameters:
      device - the device
      characteristicUuid - the characteristic uuid
      success - the success
    • onUploadRssi

      void onUploadRssi(BleDevice device, int rssi)
      上传rssi
      Parameters:
      device - the device
      rssi - the rssi
    • onMtuChanged

      void onMtuChanged(BleDevice device, int mtu, boolean success)
      配置MTU大小
      Parameters:
      device - the device
      mtu - the mtu
      success - the success
    • onUpdateNotificationState

      void onUpdateNotificationState(BleDevice device, UUID serviceUuid, UUID characteristicUuid, boolean enable, boolean success)
      配置通知是不是OK
      Parameters:
      device - the device
      serviceUuid - the service uuid
      characteristicUuid - the characteristic uuid
      enable - the enable
      success - the success