This is example setup of MVP Android
GPL-3.0 License
This is example of MVP Android
MVP (Model View Presenter) pattern is a derivative from the well known MVC (Model View Controller), which for a while now is gaining importance in the development of Android applications. There are more and more people talking about it, but yet very few reliable and structured information. That is why I wanted to use this blog to encourage the discussion and bring all our knowledge to apply it in the best possible way to our projects.
##What is MVP?
The presenter is responsible to act as the middle man between view and model. It retrieves data from the model and returns it formatted to the view. But unlike the typical MVC, it also decides what happens when you interact with the view.
The view, usually implemented by an Activity (it may be a Fragment, a View depending on how the app is structured), will contain a reference to the presenter. Presenter will be ideally provided by a dependency injector such as Dagger, but in case you dont use something like this, it will be responsible for creating the presenter object. The only thing that the view will do is calling a method from the presenter every time there is an interface action (a button click for example).
In an application with a good layered architecture, this model would only be the gateway to the domain layer or business logic.
This project already setup firebase analytics. just replace the google-service.json with your json file. Create gradle.properties (if not exist), put
MVP_URL_API_PROD = "YOUR API URL"
##Sample Only one Sample of MVP provided which in splash folder