I wanna ask about rx api design, If I have a say G...
# rx
u
I wanna ask about rx api design, If I have a say GpsProvider which has currentPositionObservable. I want to subscribe to such observable only in foreground. For that Id have AppVisibilityManager isInForegroundObservable. All good until now. Now I need to wire it all up. i.e. inForegroundObservable.switchMap { if (it) gpsProvider.currentPositionObservshle else Observable.empty }