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
Post a Comment