Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notify和write用的不是同一个UUID,notify不进onCharacteristicChanged方法 #542

Open
guhuixiong opened this issue Jun 14, 2022 · 3 comments

Comments

@guhuixiong
Copy link

`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")
            
            }
        }
    })`
@lichao3140
Copy link

请问这问题你解决了吗

@guhuixiong
Copy link
Author

请问这问题你解决了吗

还没有,怎么弄都不行

@wangjinchan
Copy link

解决了:#574

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants