Any way to make the app not use memory in Android emulator?

I implemented saving / loading application state in onSave / RestoreInstanceState and onCreate in one of my Android apps. Is there a way to get the emulator to delete my application from memory in order to call onRestoreInstanceState?

At present, it looks like my application just stays in memory (for a while longer than I'm ready to wait). When I press the home button when my activity is active, I get the following method calls:

  • onSaveInstanceState
  • Onstop

When I reactivate my application, all I get is

  • onRestart

Is there any emulator way to make my application mothbaldle to call onRestoreInstanceState and / or onCreate again?

+6
source share
1 answer

Use the DevTools app ("Destroy Actions Immediately").

+5
source

Source: https://habr.com/ru/post/900730/


All Articles