How to send event from Service to Activity with Otto event bus?

后端 未结 7 1772
心在旅途
心在旅途 2020-12-02 05:19

Simple BusProvider.getInstance().post() bring exception not main thread. How to send event from Service to Activity with Otto event bus?

7条回答
  •  感动是毒
    2020-12-02 06:16

    bus = new Bus(ThreadEnforcer.ANY); is the clear solution to this problem. Its all you have to do.

提交回复
热议问题