Are you saving your data to the provided bundle? If not, you are doing it wrong...
Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Jul 23, 2012 at 10:34 AM, Andrew <[email protected] > wrote: > No; this is a layered system and I don't have access to all the code > involved anyway. > > I understand the purpose of this method is as per spec: > >> This method is called before an activity may be killed so that when it >> comes back some time in the future it can restore its state. > > Which is exactly what is required, but this seems to be slightly off-topic. > > The problem is that process is sometimes killed right in the middle of > running this method; this is not defined in spec (or it is?). > I just need a reliable alternative. > > > On Monday, July 23, 2012 12:11:52 PM UTC-4, MagouyaWare < > [email protected]> wrote: > >> 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<http://sites.google.com/site/magouyaware> >> >> >> On Mon, Jul 23, 2012 at 9:57 AM, Andrew <andrew.maslyuk@** >> allegrowireless.com <[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/**r**eference/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 android-developers@** >>> googlegroups.com <[email protected]> >>> To unsubscribe from this group, send email to >>> android-developers+**[email protected]<android-developers%[email protected]> >>> For more options, visit this group at >>> http://groups.google.com/**group/android-developers?hl=en<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 > -- 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

