【发布时间】:2018-03-09 15:33:07
【问题描述】:
在按钮的帮助下,用户可以接收特性通知。将执行以下代码:
connection.setupNotification(setDescriptorEnableNotification(tmpCharacterostoc, connection))
.flatMap(notificationObservable -> notificationObservable)
.observeOn(Schedulers.io())
.subscribeOn(Schedulers.io())
.subscribe(bytes ->
//data processing
);
如果用户再次点击按钮,通知应该被取消订阅,这样就不会收到任何通知。
我该怎么做?
我尝试将描述符的值设置为BluetoothGattDescriptor。 DISABLE_NOTIFICATION_VALUE 但它不起作用。
【问题讨论】:
标签: bluetooth-lowenergy rx-android rxandroidble