You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I solved the problem,but the other one is coming,at the same activity,I call functions include EventBus().getDefault().registerSticky(this) and EventBus.getDefault.postSticky(msg) ,the function noted by @subscriber will work,ok or not ? The msg I post is a java bean,
this is the java bean:
public class PWDEventBusMsg implements Serializable{
public boolean b ;
public String detail;
public PWDEventBusMsg(boolean b, String detail){
this.b = b;
this.detail = detail;
}
public String getDetail(){
return getDetail();
}
public boolean getMsg(){
return b;
}
}
And the ide prints logs are:
04-07 15:50:05.388 26364-26364/com.lhwh.lehuaonego W/System.err: at com.lhwh.lehuaonego.bean.PWDEventBusMsg.getDetail(PWDEventBusMsg.java:18)
04-07 15:50:05.388 26364-26364/com.lhwh.lehuaonego W/System.err: at com.lhwh.lehuaonego.activity.ForgetPosswordActivity.onEventMainThread(ForgetPosswordActivity.java:272)
the function noted by @subscriber : @subscriber
public void onEventMainThread(PWDEventBusMsg msg) {
if (msg.getMsg()) {
initRequest();
} else {
MyToast.show(getApplicationContext(), msg.getDetail());
}
}
The corresponding codes are:
line 18: At class named PWDEventBusMsg , return getDetail();
line 272: At the function noted by @subscriber ,
MyToast.show(getApplicationContext(), msg.getDetail());
hello,I discovered a problem,the function that eventbus.getdefault.postSticky() in BroadcastReceiver is not work,please help me,thank you
The text was updated successfully, but these errors were encountered: