Are you *sure* *onSaveInstanceState*() is actually being called?
This will only happen if your app is in danger of being killed off when you
don't want it to be.
Try opening a bunch of other apps (like the browser which is pretty heavy)
after yours is open and it will probably trigger onSaveInstanceState() once
your app gets kicked from memory. Go back to your app and it should trigger
onRestoreIntanceState() and the bundle in onCreate() should not be null.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking


On Wed, Dec 2, 2009 at 10:52 PM, and.pradeep <and.prad...@gmail.com> wrote:

> Hi,
>  I am working with the saving an applications state.
>
> I am using onSaveInstanceState(Bundle savedInstanceState) to save
> state.
> In onCreate(Bundle savedInstanceState), I always get
> savedInstanceState as null and
>
> onRestoreInstanceState(Bundle savedInstanceState)  is never called
> even.
> According to the reference this method is called between onStart() and
> onPostCreate(Bundle).
>
> I am working on emulator.
>
>
> --
> 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
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to