FastBle
FastBle copied to clipboard
notify和write用的不是同一个UUID,notify不进onCharacteristicChanged方法
`bleManager.notify(bleDevice,BL2K_SERVICE,BL2K_CHARACTERISTIC,object : BleNotifyCallback() { override fun onNotifyFailure(exception: BleException?) { Log.d(TAG,"notifyDeviceState failure $exception") }
override fun onNotifySuccess() {
Log.d(TAG,"onNotifySuccess")
_deviceState.postValue(DeviceState())
}
override fun onCharacteristicChanged(data: ByteArray?) {
Log.d(TAG, "onCharacteristicChanged----")
data?.let {
val state = String(it)
Log.d(TAG, "notifyDeviceState state:$state")
}
}
})`
请问这问题你解决了吗
请问这问题你解决了吗
还没有,怎么弄都不行
解决了:https://github.com/Jasonchenlijian/FastBle/issues/574