> > Anyway, looks like this method should be extended only in cases when > nothing else works. >
Umm... no. Doesn't seem like you are understanding the purpose of this method. Out of sheer curiosity, would you mind posting some snippets of your onSaveInstanceState() method? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Jul 23, 2012 at 9:57 AM, Andrew <[email protected]>wrote: > In fact - it is called every time our state needs to be saved. > Anyway, looks like this method should be extended only in cases when > nothing else works. > I'll do more tests with onPause and private state storage to see if > there's any difference in OS behaviour. > > Thanks. > > On Monday, July 23, 2012 11:38:11 AM UTC-4, Mark Murphy (a Commons Guy) > wrote: > >> On Mon, Jul 23, 2012 at 11:14 AM, Andrew wrote: >> > I was not trying to save state for orientation change, but for general >> > application state preserving while getting into background in case OS >> > decided to kill/restore application. >> >> That is not what onSaveInstanceState() is for. Quoting the documentation: >> >> > Note that it is important to save persistent data in onPause() instead >> of onSaveInstanceState(Bundle) because the latter is not part of the >> lifecycle callbacks, so will not be called in every situation as described >> in its documentation. >> >> (from http://developer.android.com/**reference/android/app/** >> Activity.html#**ActivityLifecycle<http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle>) >> >> >> -- >> Mark Murphy (a Commons Guy) >> http://commonsware.com | http://github.com/commonsguy >> http://commonsware.com/blog | http://twitter.com/commonsguy >> >> _The Busy Coder's Guide to Android Development_ Version 3.8 Available! >> > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

