Losing Data on Reboot

by droozen » Fri, 10 Apr 2009 21:35:59 GMT


Sponsored Links
 So, I made a mistake and I still had the debug version of my app (from
Eclipse) on my phone when I tried to install a signed version. The
install failed, but I could no longer access the debug version in
Manage Applications to uninstall it. I was at work and couldn't
reinstall the debug version in order to uninstall, so I did a complete
factory reset of my phone (using MyBackup Pro to backup stuff).

Now I can install my app. However, now I notice upon reboot that my
app loses all of its data from shared preferences. I'm not entirely
sure that it's not a problem of mine somehow, but does anyone know why
it is doing that and how I can fix it? I may have left the
debuggable=true on in the version I'm trying to test. Would that cause
this problem?
--~--~---------~--~----~------------~-------~--~----~



Losing Data on Reboot

by droozen » Fri, 10 Apr 2009 22:07:30 GMT


 If it helps at all, I've discovered that this only happens if my
bootup service tries to read certain preferences and install an alarm.
I've used this process to install several other alarms, but for some
reason the latest alarms I've added have been causing me to lose all
my preferences on a reboot.

I'm not doing anything different that I can tell, but maybe there's
some known problem that can caused shared preferences to crash and
disappear like this?



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Losing Data on Reboot

by ellipsoidmob...@googlemail.com » Sun, 12 Apr 2009 02:25:34 GMT


 Are you certain the problem is related to the changes you have made?
Just wondering if there could be a simpler explanation, like you're
not writing the preferences in or before onPause(), or maybe you're
not always calling commit() on the preferences editor?
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Warning msg 鈥淣o keyboard for id 0鈥????

I am new in Android app. development, now I have encountered a strange
problem with the Menu button. Here is the thing:

I have two activities, "ActivityOne" and "ActivityTwo", where
"ActivityTwo" is the child Activity of "ActivityOne". In both
activity, I have defined the menu button options like following:

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    super.onCreateOptionsMenu(menu);
    MenuItem insertMenuItem = menu.add(0, INSERT_ID, 0,
R.string.menu_insert);
    insertMenuItem.setIcon(R.drawable.ic_menu_add);

    MenuItem settingMenuItem = menu.add(0, SETTING_ID, 0,
R.string.menu_setting);
    settingMenuItem.setIcon(R.drawable.ic_menu_settings);

    MenuItem aboutMenuItem = menu.add(0, ABOUT_ID, 0,
R.string.menu_about);
    aboutMenuItem.setIcon(R.drawable.ic_menu_about);

    logPrinter.println("creating menu options...");

    return true;
}

@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
    switch(item.getItemId()) {
        case INSERT_ID:
            doInsert();
            return true;
        case SETTING_ID:
         return true;
        case ABOUT_ID:
         showAbout();
         return true;
    }

    return super.onMenuItemSelected(featureId, item);
}


I have defined the above functions in both Activities.

In "ActivityOne", when I click the physical Menu button, there is no
menu options pop up from screen bottom, when I checked the LogCat
console, there are two warning messages, which are "No keyboard for id
0" and "Using default keyMap:/system/usr/keychars/qwerty.kcm.bin" .

BUT, in "ActivityTwo", the menu button works fine, it shows me those
menu options I defined.

Why the menu button does not work in "ActivityOne" ?? What does the
warning msg mean???

-- 

2. Is it possible to load an URL/web page into a piece of screen in android?

Hello to all,

How can i load an URL/web page into a piece of screen in android, e.g.
only 30 % like a browser, and the rest  70% to use for printing my
stuff on the screen.
Can someone tell me if it is possible?

Thank you,
Lidia

-- 

3. I can not find the definition of s ome code in linux kernel by using source insight锛

4. Opencore version 2.50 issues

5. Native camera preview/take picture

6. Question on using custom View for a ListAdapter...

7. getting eclipse sdk to work with ubuntu 10.10