Absolutely. Things like my preferences and my DB are fine.

But since 2.2 if  my large files are stored in the recommended
directory (from what I remember something like .../Android/data/
packagename/) then when I install a new version (currently I've only
tried through ADB and side-loading, NOT market - don't know if that
affects it) all of the files get erased.

Currently if this is the case I think I'm going to move to storing
data in .../data/packagename/ as I've seen a few other apps do this
and the less I mess up someone's SD card the better. At least a file-
copy and delete should be much quicker for the user than re-
downloading :)

But if you could check (or someone?) - I might be being an idiot. I
did however go through my code and make sure I didn't have a
deleteAllFiles() or something like that somewhere.

On Jul 24, 8:57 pm, Dianne Hackborn <[email protected]> wrote:
> Ergh...  that may be a bug. :(  To be clear, when doing the update your
> internal data is not being erased, but the data on the SD card is?
>
> On Sat, Jul 24, 2010 at 10:11 AM, Joseph Earl <[email protected]>wrote:
>
>
>
> > I have an application which resides on the phone memory but downloads
> > large data to the SD card on first launch (the app needs to be able to
> > work without an internet connection most of the time)
>
> > When using the recommend directory given in Froyo it seems all files
> > on the SD card are deleted when I install a newer version of the .apk.
> > I'd preferably like the files removed on uninstall, but not on upgrade
> > since the files on the SD card aren't going to change between
> > application versions, and forcing the user to re-download a large file
> > that is independent of the application version does not seem
> > reasonable.
>
> > At the moment it seems I'm forced to use a different directory to the
> > recommended one in order to stop Froyo deleting all the files when the
> > application is upgraded.
>
> > Am I doing something wrong, or is this how it is supposed to work (I'm
> > guessing it is)? (Or perhaps I misunderstood what getExternalFilesDir
> > is for)
>
> > --
> > 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]<android-developers%[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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