Context
I've written an Android App to play single media file with its lyrics being displayed in the activity. The Activity screen also has a Play-Pause toggle button and a seek-bar to forward/rewind using drag. And the Activity launches the Started Service in its onCreate() method.
I'm attempting to layer the app confirming to MVP design pattern. I'm looking for sample code as guidance that fits this kind of a situation. Your help is much appreciated.
Things I'm keen to learn
- In case like mine where the Activity and the Started Service have two-way communications using EventBus, where does the code for EventBus listener lie in? Is Presenter not having any role in this?
- How is the code tested for EventBus related code - both unit and integrating testing?
- What code comes in Activity? What comes in Service? And What does the Presenter contract with Activity and Service look like? Lastly, how does the implementation of this presenter look like?
- How do you manage code for MenuOptions click events in the case of MVP?
Any reference to existing code-repository in Github/Bitbucket is really appreciated, if a detailed explanation hurts for you. Thanks in advance.