Is there build in way with square otto to send events in a loop or to time events? Or do I have to handle firing events in a loop myself?
Asked
Active
Viewed 403 times
2 Answers
1
I don't see anything about this feature in Otto documentation so I think you need to implement this behaviour yourself.
But are you sure you need this behaviour? You should use eventbus when some event happend, not to inform in the loop about events that happend in the past. But if you want to notify about past events new registered instances you should probably use @Produce pattern from Otto.

pstrag
- 617
- 5
- 16
-
Thank u for your quick answer. I also didn't find anything in the documentation, but thought there is maybe a way. Ok so i will handle this myself. I'm using Retrofit with Otto to encapsulate the API from the other parts on an app but I have to request the Server in intervals. – Fabian Mar 03 '15 at 08:19
1
Otto doesn't support this. You can try TinyBus which in addition to Otto API has postDelayed(Object, long)
method for posting delayed events.

sergej shafarenka
- 20,071
- 7
- 67
- 86