wandersnail / easyble-x

A simple framework for Android Bluetooth Low Energy (BLE)
Apache License 2.0
156 stars 37 forks source link

请教一个问题 #32

Closed ylmyg closed 1 year ago

ylmyg commented 1 year ago

我想把连接这块代码逻辑封装成单例模式,但是看到通知开关回调都是通过观察者模式回调,请问我怎么在单例中用观察者?

wandersnail commented 1 year ago

把你单例对象注册成观察者即可