hehonghui / hehonghui/AndroidEventBus
使用jar收不到消息
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 390
- PR merge metrics
- No merged PRs in 30d
Description
你好,我用了这个版本的jar,就直接传字符串都收不到消息。在MainActivity的onCreate 中 EventBus.getDefault().register(this); 注册,onDestroy中 EventBus.getDefault().unregister(this);
在button中的点击事件发了这个 EventBus.getDefault().post(new ReceviceEvent("I am send a message"));
然后在SecondActivity 中 @Subscriber(mode= ThreadMode.MAIN)
public void Message(ReceviceEvent s){
Log.e(TAG,"sting ××××××××:"+s.getMessage());
},但是却收不到消息,不知道哪出了问题。能不能帮忙解决一下?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the EventBus registration in MainActivity.onCreate and onDestroy, then trace the button's post call and SecondActivity's @Subscriber method. Reproduce the reported flow and verify the subscriber is registered when the event is posted; done means the message appears in the SecondActivity log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100