There is also android.content.SharedPreferences

http://developer.android.com/reference/android/content/SharedPreferences.html

Balwinder Kaur
Mobile.Software.Development
·T· · ·Mobile· stick together

The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Sep 24, 2:35 pm, leden <leden...@gmail.com> wrote:
> Hi!
> My simple app needs to permanantly save its state before being
> destroyed.
> I use something like this:
> private static final Preferences prefs = Preferences.userNodeForPackage
> (WordChoice.class);
>
> Now it seems that after experimenting a while on my g1 device, it
> seems that preferences are sometimes cleared when the application
> stops, from my experience this happens at random and there is a
> roughly a 50% chance that preferences will be cleared.
> This does not happen in the emulator, and certainly should not in the
> Java world as far as I know since preferences are permanent type of
> storing data.
>
> Is there a way to use java.util.prefs.Preferences on Android platform
> without risking clearing the prefs every time the app is stopped? I
> don't want to use a file or database.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to