Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails on Android process restart #9

Open
mplzgta opened this issue Jan 19, 2016 · 0 comments
Open

Fails on Android process restart #9

mplzgta opened this issue Jan 19, 2016 · 0 comments

Comments

@mplzgta
Copy link

mplzgta commented Jan 19, 2016

I really love your app as a model for DI for my own! Here's one design problem:

Sometimes Android kills an app process in the background because of low memory. It restarts it automatically when it come back.
(This is different from killing and restarting activities: for a good review see here http://stackoverflow.com/questions/14375720/android-destroying-activities-killing-processes)

Your app crashes under such conditions, if you are not on the startup activity, since the user component is not recreated. The reason is that Android when restarting the app, Android recreates the app object, then the topmost activity (not the earlier ones, until they come into view).

You can verify in your own app by turning on the Developer Option...Background process limit to zero, then drilling down into a user, then switching away from your app and back. The app crashes.

It would be cool to see how you would modify your app and your design pattern to deal with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant