I want to emmit one item after x seconds if no items have been emited. I was trying to use the timeout operator. The problem is that timeout operator requires at least one item to be executed previously to start the countdown. From the documentation:
"If the next item isn't emitted within the specified timeout duration starting from its predecessor, the resulting Observable begins instead to mirror a fallback Observable."
That is not the behaviour I'm looking for. When I subscribe to my observable, I want to emit a particular item if a particular period of time elapses without any emitted items previously.
Example:
getUserLocationFromGPS() //Sometimes I dont receive user location
.timeout(5, TimeUnit.SECONDS, Observable.just(getDefaultLocation())
.subscribe(...);