https://kotlinlang.org logo
#coroutines
Title
# coroutines
p

Paul Woitaschek

10/30/2018, 9:17 PM
I tried to do the same with sensor manager - it feels kind of complicated: https://github.com/PaulWoitaschek/Voice/commit/58abc5302af30328e6f11593aed5deac78aa1e5b
l

louiscad

10/30/2018, 9:47 PM
I'd not advise you to do this with sensors because it's high frequency, and channels may put GC pressure on it. I just use plain callbacks, with classes, mutable properties and functions for sensors code.
p

Paul Woitaschek

10/30/2018, 9:53 PM
It's fine; I'm debouncing now.
2 Views