[android-developers] Re: How to save variables, even when I close the APP

2010-02-21 Thread ko5tik
You have to use onPause() and onResume() callbacks
in your activity.  Values can be safely saved in [shared]
preferences.

I started small JSON marshaller library,  it may be of interest
for you:
http://github.com/ko5tik/jsonserializer
( not much docs there yet,  look into testcases as API is really
simple)

-- 
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


[android-developers] Re: How to save variables, even when I close the APP

2010-02-22 Thread LeGeNDuS
Thank you so much for both answers. Very interesting. Finally I have
used the SharedPreferences to do this. It works perfectly...like I
want.

On 21 feb, 18:27, TreKing  wrote:
> On Sun, Feb 21, 2010 at 11:03 AM, LeGeNDuS  wrote:
> > Last one's settings are defined by user, and when he finish it close
> > the activity going back to the main.
>
> > But when he wants to go again to the "other" activity, the settings
> > are not like the user chosen.
>
> Sounds like you should be storing these in the SharedPreferences. Look it up
> in the documentation to see how it's used.
>
> --- 
> --
> 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 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