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
0
votes
1 answer

How to use Fetch in JavaScript (V8go, Otto) in Golang?

I am trying to run JavaScript inside of a Golang function, and use fetch to fetch JSON via APIs in the Javascript context. I tried it in Otto with the following code: import "github.com/robertkrimen/otto" vm := otto.New() vm.Run(` …
Filippo
  • 83
  • 9
0
votes
1 answer

Event Bus not received

I'm trying to pass an event with Otto Event Bus from the SplashActivity to LoginActivity which is 2 o 3 activities later with: SplashActivity @Override public void onStart() { super.onStart(); …
Víctor Martín
  • 3,352
  • 7
  • 48
  • 94
0
votes
0 answers

Two instances of same class cannot produce any methods. (Event Bus otto)

I have encountered a situation where I have a class (let's call this class "A") with a @Produce method. In another class, if I initialize two objects from class "A". Event bus throws an exception that the producer class is already registered. Is…
Farooq Arshed
  • 1,984
  • 2
  • 17
  • 26
0
votes
0 answers

Otto subscribe and post in the same fragment does not work

I have three fragments in the same activity, let says FragmentA, FragmentB and FragmentC Let´s say that FragmentA sends an int to FragmentB so in the FragmentA I have: //FRAGMENT_A @Override public void onDestroy() { …
JoCuTo
  • 2,463
  • 4
  • 28
  • 44
0
votes
1 answer

how to manager the singleton object's live cycle (where to unregister the otto listener)?

Having a singleton dataManager object which registers the OTTO listener in its constructor to listen to data ready event. In the application the dataManager is referred anywhere as DataManager.instance.functionOfIt() If not call…
lannyf
  • 9,865
  • 12
  • 70
  • 152
0
votes
0 answers

how to stop the otto event propagation

Trying to use otto to replace our native event manager. One use case it has is the event could be subscribed by multiple listeners in different places, but only the first one received it should handle it and stops the this event's propagation. Is…
lannyf
  • 9,865
  • 12
  • 70
  • 152
0
votes
1 answer

How to know when service is started after calling startService() method to send otto event?

I have AlarmReceiver(BrodcastReceiver) that starts DownloadService(Service) after check if service is not running state context.startDownloadServiceIfNotRunning()// kotlin extension function check service state after this line i am sending otto …
0
votes
2 answers

Android - updating Grid UI in debug mode but not updating at run time using Otto

I want to update the icon status from red to green after successfull upload of the image in background service. I am using Otto event bus to transfer data between Service to Activity, I can able to subscribe and get the data from Service to Activity…
Shailendra Madda
  • 20,649
  • 15
  • 100
  • 138
0
votes
1 answer

Otto not sending data When Activity ReCreates (After OnDestroy)?

I am using Otto to send events from IntentService to my Activity. IntentService is Downloading files from server and send progress to Activity this is working with otto very well. - I have done so far registered otto in…
0
votes
1 answer

BusProvider Not Returning to @Subscribe

I am using BusProvider with on Android to handle post backs to the main thread after executing an AsynTask. When the Async task is finished and it is successful it registers the Post and returns to the MAIN thread to display an alert dialog. When it…
Keeano
  • 309
  • 8
  • 33
0
votes
1 answer

Using Otto.Bus Post and @subscribe is not being called

I am trying to get @Subscribe to call back to the activity from an AsyncTask. I have read through the Otto technical documentation and have also read many of different articles online as well as here on stack and none of them seem to help me solve…
Keeano
  • 309
  • 8
  • 33
0
votes
2 answers

viewpager fragments not receiving otto events from activity

I have an activity with a Viewpager. my viewpager has several fragments. i want to send Otto event to a fragment when it is selected, thus i implement ViewPager.OnPageChangeListener @Override public void onPageSelected(int position) { …
Edijae Crusar
  • 3,473
  • 3
  • 37
  • 74
0
votes
1 answer

How to run a method when query is finishing?

I am using Firebase. My problem is, while i'm querying objects and then modifying them, my main ui thread goes ahead and runs the next methods. I want my main ui thread to wait until my firebase query is finished and I made all the necessary changes…
TheQ
  • 1,949
  • 10
  • 38
  • 63
0
votes
1 answer

Otto events handling order

Please help me to figure out if the following scenarios are valid if I'm going to use Otto Bus lib. If I need to ensure the order of subscriber execution. I have two component that are listening for the same event type,is there the Otto…
Denis Voloshin
  • 768
  • 10
  • 32
0
votes
1 answer

Otto unregistering the same instance

I have a BaseFragment which within it's onCreateView method, creates a MyObject class. Both of these are inside a ViewPager. Two different fragments extends from the BaseFragment - FragmentA, FragmentB. This means FragmentA and FragmentB both have…
Subby
  • 5,370
  • 15
  • 70
  • 125