"Don't keep activities" setting did not work on the device


#1

I was not able to scroll down the Setting page on the emulator to enable “Don’t keep activities” mentioned on p69.

I tried it on my Samsung Galaxy nexus, Android version 4.3

I started GeoQuiz app. Hit next on a few questions and then clicked Home. Got back to the GeoQuiz app. It was still on the question when I hit Home. I was expecting it to go back to the first question.


#2

It should be in the Developer Options (check out my other post for finding those).


#3

Are you wondering if I did not find the “Don’t keep activities” setting. I found it and enabled it. But the device still did not reset the GeoQuiz to the first question when I hit Home and then resume the app again from the Task list.

BTW, now that I figured out how to enable “Don’t keep activities” on the emulator also, I tried it there. Rotating the screen to landscape and back, I see that the question is not getting reset to the first question, meaning the activities record is not being trashed?


#4

The activity record won’t be trashed - you can rely on it staying there even if the activity is destroyed. This is why we stash data in savedInstanceState.