Thanks a lot. After I posted this I tried doing this and got my
answer :).
About the saveInstanceState: It says it is only for saving state
associated with a current instance of an Activity, for example current
navigation or selection  info. So can't we store some info (like: some
arrays, some text) as this might form my state info. I tried doing I
got the arrays null so want to know what all state means as when I
wanted to store my arrays I could not so my confusion was as to what
all state info mean.
Thanks again.

On Jan 26, 12:49 pm, TreKing <[email protected]> wrote:
> On Mon, Jan 25, 2010 at 4:29 PM, katti <[email protected]> wrote:
> > What does state of an application include?
>
> That's really up to you to decide, but basically if the user switches
> orientation they should be able to continue doing whatever they were doing
> without having to start some process over.
>
> > Does it include only
> > cursor position,...etc or does it include some text the user has got
> > like in my example when the game is over I display Some xyz is the
> > winner?
>
> That's up to you and whether it makes sense for your application.
>
> >   My problem is I have 4 buttons when user clicks on any button
> > certain info is shown on the button. Now when the orientation changes
> > the info is lost.
>
> That would be a good place to save and restore the state.
>
> > To save the info I have used preferences( so I have
> > converted the info into string and stores). Now I am not able to
> > understand if this (saving of data) shoudl be done in onPause/onResume
> > or in onSaveInstanceState/onRestoreInstanceState.
>
> Is this data that should persist across application restarts? If so, save in
> pause / resume as part of preferences or to a db or file. If this is data
> that should just stay consistent across orientation change, use
> onSaveInstanceState / onRestoreInstanceState.
>
> >  As I was looking for this info I found somebody say that "the
> > savedInstanceState is only for saving state associated with a current
> > instance of an Activity, for example current navigation or selection
> > info" so a little confusion.
>
> Why is that confusing? What don't you understand about that statement.
>
> >  Thanks in advance
>
> You're welcome in advance.
>
> -------------------------------------------------------------------------------------------------
> TreKing - Chicago transit tracking app for Android-powered 
> deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to