Hi there. I'm trying to implement some sort of not...
# rx
u
Hi there. I'm trying to implement some sort of notification player. Suppose we have the following class:
Copy code
data class Notification(
        ...
        val duration : Long
)
and then this function:
abstract fun observeNotifications() : Observable<Notification>
What I would like to implement precisely, is a way to observe expired/played notifications (i.e. when a notification time on the screen is over):
abstract fun observeExpiredNotifications() : Observable<Notification>
I suppose that in order to implement all this, one should use
timer()
and
interval()
operators. Any ideas? Thanks in advance.