[android-developers] Context.getExternalFilesDir() folder is removed on app upgrade? Where to store data?
Greetings all,
Since API 8 (Froyo) we have a standard place to store application
files on external storage (read this article for more info:
http://developer.android.com/intl/fr/guide/topics/data/data-storage.html)
My existing application downloads a fair chunk of data to SD card on
the user's command to save space on the internal phone storage, which
as we all know is quite limited on most devices. Previously I was
storing the data in a folder on the external storage root but thought
the "accepted" location was a good idea, especially since 2.2+ will
delete that folder when the app is uninstalled (which of course is not
the case for the folder I'm currently using, not to mention it messies
up the user's SD card).
The problem? The folder is deleted when the application is upgraded,
not just installed. This really defeats the purpose, since I don't
want to require my users to re-download the data (several megabytes)
every time I issue a bug fix (or any other) release. I can't just
rely on installing the app to SD along with all the data in the apk
since the majority of devices do not yet have 2.2, and probably won't
for a long while.
Note that I can't verify that a market upgrade leaves the folder
intact, since I don't want to publish my new version until I know that
it won't delete the folder. Can anyone speak if market upgrades do in
fact leave the folder intact? Reinstalling via adb sure doesn't, so I
suspect the Market upgrade behavior is the same.
If that folder cannot be used, what's a better alternative than what
I'm doing now? Ideally I'd like a folder that gets removed on
*uninstall*, but not *upgrade*.
Thanks for any good ideas. :-)
Regards,
Jean-Guy
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home