Anyone have a good use case for using channels on ...
# coroutines
i
Anyone have a good use case for using channels on Android? I'm trying to learn it, but I can't think in any good reason to use it on Android (Not saying that it doesn't exists tho)
l
Callbacks hells like Camera2 or BluetoothGatt (for BluetoothGatt, an open source library I worked on already exists for this: https://github.com/Beepiz/BleGattCoroutines)
j
anything you would need a stream of data for
o observe changes in a DB for instance
w
d
- Channels (directly) to wrap callbacks and make it readable. - Actors to confine mutability, and so, remove
synchronize
calls
@withoutclass brilliant! Bookmarked :)
w
😮 thanks 😄
@dekans if you like that definitely check out @louiscad’s libraries for bluetooth
d
I already know it, thanks :)
Aha, great 🙂
d
I already use channels to hide callback API
i
Thanks guys, I'll definitely check it out 😃