The stuff that should be "cleared" "when the application is closed by the OS" are not preferences, so do not implement them as such. Use static data members or something along those lines, so they will go away automatically when Android terminates the process.
On Tue, Mar 6, 2012 at 10:00 AM, Alejandro Alves <[email protected]> wrote: > Hello, > I want to have some preferences stored "forever" by my application, > for example username, remember me, etc...and other preferences to be > stored only until the application is closed, or the user logs out. So > basically my question is how do I delcare which preferences must be > stored for ever, and how to clear the preferences only when the > application is closed by the OS. > thanks > > -- > 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 -- 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 *Advanced* Android Development_ Version 2.5 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

