Search code examples
androidandroid-activityactivity-lifecycle

Android Immediately Destroy Activities (Debug-Flag), Realistic?


On my Android Emulator I have the Flag "Immediately Destroy Activities". Under this condition my App does not do what I want it to do, because my MainActivity always has to be on the ActivityStack. Is it a real scenario that Activitys of the ActivityStack are destroyed, while my app is running?


Solution

  • Is it a real scenario that Activitys of the ActivityStack are destroyed, while my app is running?

    It is certainly possible for an activity to be destroyed at any time, so long as that activity is not on the screen.