Skip to content

Fails on Android process restart #9

Description

@mplzgta

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions