weliem / blessed-android-coroutines

BLESSED Coroutines, a Bluetooth Low Energy (BLE) library for Android using Kotlin Coroutines
MIT License
128 stars 34 forks source link

How to stop observing connection state #39

Closed droideveloper1996 closed 1 year ago

droideveloper1996 commented 1 year ago

I am observing connection during onResume and I can't figure out way to stopObserving this. Is there any way to do so?

centralManager.observeConnectionState { peripheral, state -> Log.d("Connected Device",peripheral.address) }

weliem commented 1 year ago

you could simply provide an 'empty' lambda to observeConnectionState