at a guess, market upgrades work by replacing the APK. the application then handles upgrade issues when it first launches after the replacement. as you've seen, the uninstall/install cycle will wipe out preferences, not really what you want.

i simulate upgrades by doing adb reinstall. i see that in some SDKs reinstall has been deprecated, so maybe install now does a reinstall by default.

either way, do a reinstall over the old version. that most accurately simulates an in-the-field upgrade.

AFAICT!

i'm flattered but no, thanks :-)



Any suggestions on how to test upgrade between versions? I need to be sure my application can handle being upgraded from any version released on market.

Currently I'm doing adb shell pm uninstall -k to remove the old program, and run adb install with the new version. This method sucks because it's a lot of manual work. On top of that I'm not even 100% certain this method acts the same way market does upgrades.


I use Sqlite and have unit tests which covers upgrading from any database versions, so I'm sure this is covered. But is there anything else I need to worry about?

I experienced loss of shared preferences when doing an upgrade this way. That is is very serious for my app as I keep a flag in shared preferences for knowing if this is a clean installed phone or not. If it's clean it starts loading default data into the app. This creates duplicates and a mess.

All tips and suggestions will make me wanna marry you,
Finn

--
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>http://groups.google.com/group/android-developers?hl=en


--
jason.vp.engineering.particle

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

Reply via email to