greenrobot eventbus - Android Listen to events from Library Module -


i creating library on android using eventbus.

i posting event in library.

                    eventbus.getdefault().post(new connecttodataevent(constants.auth,true)); 

the app module registered listen events.

 @override public void onstart() {     super.onstart();     eventbus.getdefault().register(this); }  @override public void onstop() {     super.onstop();     eventbus.getdefault().unregister(this); } 

the subscribe method

@subscribe(threadmode = threadmode.main) public void onmessageevent(connecttodataevent event) {      loginonclick();   }; 

i receiving

no subscribers registered event 

is right way use in library or not possible @ all.

any appreciated.

have opened activity before posting event?


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -