sockeqwe / mosby

A Model-View-Presenter / Model-View-Intent library for modern Android apps
http://hannesdorfmann.com/mosby/
Apache License 2.0
5.49k stars 841 forks source link

Don't destroy presenter when actvity destroy #291

Closed alexei-28 closed 6 years ago

alexei-28 commented 6 years ago

In my phone when minimize aplicatoin then the Android destroy activity. In Developer options I turn "Don't keep activities". Suppose I minimize application. As result the activity is destroy. I need to presenter to survive the Activity re-creation. Is it possible on Mosby?

sockeqwe commented 6 years ago

No, that's not possible as that is how Android works. Note that's also not possible with any other Framework or Library . Again, you should move things that should live longer than activity / presenter on the outside.

Also note that " don't keep Activity option" is not simulating real world behavior. Only the whole process is destroyed and not single Activities (as don't keep activity is emulating).