In my current android projects I'm using a sqlite db to store my collections of structured data. The database is accessed by a
ContentProvider called by a
Loader which updates the UI.
It looks like my app is now an old-school piece of code, since RxJava became a frequently used standard, the popularity of MVP pattern has increased as it provides more reliability to applications.
After some reads I understood that Model is where data and business logic are stored, Presenter fetches data and gives it to the View, and finally the View is almost empty, it only calls the Presenter to require data and displays it.
One of the features of the Presenter should be that it exists even after the View stops existing, this meaning that when an
Activity is recreated (e.g. screen rotation) the data is still there and doesn't need to be loaded again, but I see that in all the guides presenter is created in
onCreate method of
Activity, this means a new presenter is always created.
Am I missing something?