Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

onSaveInstanceState() and onPause() call sequence

The documentation on onSaveInstanceState() states:

If the method is called, it is always called before onStop() and possibly before onPause().

But, I notice, consistently, from log messages that onPause() is ALWAYS CALLED BEFORE onSaveInstanceState(). I had put log messages in these two methods. Please help me understand in what circumstances does onSaveInstanceState() is called before onPause().

Environment: Android v4.0 (API 14) + Eclipse v3.7.1 - Indigo.

like image 269
lupchiazoem Avatar asked Jan 09 '12 06:01

lupchiazoem


1 Answers

You can read about that here.

In a nutshell you can't never know about time when onSaveInstanceState will be run.

like image 68
RagnarR Avatar answered Oct 05 '22 07:10

RagnarR