Questions tagged [otto]

Otto is an event bus designed to decouple different parts of your application while still allowing them to communicate efficiently. It is designed with Android-specific use cases in mind.

Otto is an event bus designed to decouple different parts of your application while still allowing them to communicate efficiently. It is designed with Android-specific use cases in mind.

Forked from Guava, Otto adds unique functionality to an already refined event bus as well as specializing it to the Android platform.

186 questions
4
votes
3 answers

Otto(Event bus), send event fragment to fragment but not receiving

MainActivity has a NavigationDrawer and each navigation menu brings Fragment instead of new Activity. There is settings fragment and if I change order of the navigation menu it should be reflected immediately to NavigationDrawerFragment. I post…
Chk0nDanger
  • 1,211
  • 1
  • 10
  • 26
4
votes
1 answer

Using generic event with Otto event bus

I use Otto event bus to subscribe for Volley Requests. I want to use this generic class but the wrong fragment (subscriber) tries to handle the event. Is it possible to use a generic class or is randomly every subscriber of the VolleyResultEvent,…
Sven Mäurer
  • 715
  • 1
  • 9
  • 19
4
votes
1 answer

How do I effectively use an event bus?

Right now I am exploring some options for an android learning project. I am trying to communicate with my rails api (also a learning project). After doing some research, I think I have settled on a scheme that uses retrofit and otto. What I end up…
nPn
  • 16,254
  • 9
  • 35
  • 58
4
votes
1 answer

Event bus subscription issue (Otto - Guava event bus)

Why the event is not subscribed, and onMyEvent not called. Relavent code is below. Otto is working normally in my uses, but below scenario involves posting the event from a callback handler (this is a simplification of code involving http calls).…
bsr
  • 57,282
  • 86
  • 216
  • 316
3
votes
3 answers

Passing data from Activity to Activity using Otto is not working

It's the first time that I'm using this library, but I was following this video tutorial to send data through Fragments, but in my case, it's just Activities.. So this how I did Activity that I'm sending data : public void onClick(View view) { …
user3796130
3
votes
1 answer

EventBus Producer has been invalidated and can no longer produce events

I am using RxBus which is an RxJava clone of Otto/EventBus to communicate between the different components of my android app. The app works fine on my Motorola Moto x 2013 running ICS, without crashes. But on a Nexus 5X, running Android M, it throws…
Bubunyo Nyavor
  • 2,511
  • 24
  • 36
3
votes
0 answers

why is EventBus significantly faster while it compare with otto

Both EventBus and Otto are event bus, and I found EventBus has this conclusion: Benchmark results indicate that EventBus is significantly faster in almost every scenario: here is origin page My question is why EventBus is more faster than Otto. I…
xxxzhi
  • 471
  • 3
  • 12
3
votes
1 answer

Circle Progress Bar on Fragment is not showing progress

I'm trying to show feedback the percentage of which they have downloaded data from a server. The flow goes something like this: LoginActivity - onSuccess, call Service to download data - while Service is working, I've already switched the user to…
remedy.
  • 2,032
  • 3
  • 25
  • 48
3
votes
0 answers

Android ViewPager with Tablayout acting as Filter for Fragments

I'm overhelmed trying to find an optimal way to manage the contents of recyclerviews that are in fragments, which are managed by an ViewPager with PagerAdapter. Currently, my Application class has a complete list of objects, acting as a singleton,…
Yuri Heupa
  • 1,198
  • 3
  • 10
  • 35
3
votes
1 answer

Otto event bus receiving multiple events on single post

I am using Otto and Dagger. Some of my events are being received multiple times on only one post. In my view that posts the event: @Inject Bus mBus; In the constructor: ((MyApplication) mContext.getApplicationContext()).inject(this); …
clocksmith
  • 6,226
  • 3
  • 32
  • 45
3
votes
2 answers

Can bus events be seen by other process?

Imagine I'm using otto to send events over a bus. Is it possible to set up another service that runs on a separate process that can listen to the same bus events? I think since it's another JVM that the bus events will not be delivered to the other…
j2emanue
  • 60,549
  • 65
  • 286
  • 456
3
votes
0 answers

Let a subscriber in service react on an event posted in activity with otto eventbus

I have the launcher activity in my app that should fire an event with otto event bus in onCreate(). The activity itself makes sure that a service is started. The bus is implemented as a singleton via a BusProvider of a derived class of the bus.…
McGo
  • 3,792
  • 2
  • 13
  • 18
3
votes
4 answers

How to post event from adapter to activity using otto

Edited: Don't suggest Interface, please. I have an Activity with a RecyclerView inside. I want post an event from Adapter to Activity by otto, when Adapter will be created. I used following code: ShoppingCardAdapter public class…
Ssisakhti
  • 96
  • 1
  • 5
3
votes
3 answers

How to know a Otto Subscriber is registered

I am using Otto by Square. My subscriber class is registered in the Activity / Fragment onStart and onStop methods. However sometimes, I get this error Caused by: java.lang.IllegalArgumentException: Missing event handler for an annotated method.…
Raymond Chenon
  • 11,482
  • 15
  • 77
  • 110
3
votes
1 answer

Using Otto, method only subscribes if I call it directly elsewhere

I have an issue where one of my subscribed methods does not get called upon a post of the correct event type unless that subscribed method is used (called) elsewhere. Here is some relevant information about the code: A method of one of my classes…
TeePaps
  • 471
  • 3
  • 17
1 2
3
12 13