1. 程式人生 > >Programming Android Apps Archives

Programming Android Apps Archives

EventBus is an Android optimized event bus that simplifies communication between Activities, Fragments, Threads, Services, etc. Less code, better quality. You see, if you have developed android applications before, you will agree with me when I say that communication between different parts of the project code can be a pain. Using interfaces might work but not all the times. The idea though would be to stick to the best design patterns in Java which include decoupling your code. Eliminate dependencies. Let us get started!

EventBus-Publish-Subscribe

First Things First

To use EventBus, you should add the following to your build.gradle file (app-level file)