Sorry yes this is indeed a bug in Froyo. :(

I have patch to fix this now in the Froyo tree:

https://review.source.android.com/16151

I can't tell you when it will appear on various devices, but hopefully we
can get it rolled out fairly quickly.  (Note -- do expect to see devices
updating to Froyo for a while without this patch, since there is a fairly
long natural lag between code going in and builds being created with it and
going through TA to be delivered to devices.)

On Sun, Jul 25, 2010 at 3:07 AM, Joseph Earl <joseph.w.e...@gmail.com>wrote:

> Hi John, thanks for the info, but essentially what I was hoping to
> have was
>
> 1) Files on SD card NOT deleted during upgrade (they are independent
> of the app version)
> 2) Files on SD card ARE deleted during final uninstall
>
> However they get deleted in both those scenarios which is not useful
> to me, as I cannot ask the user to re-download ~200MB of files again
> if I need to release an upgrade to fix a bug or something.
>
> On Jul 25, 3:10 am, john <john4...@gmail.com> wrote:
> > If you're using API Level 8 or greater, use getExternalFilesDir(null)
> > to save a File.
> >
> > It will be deleted when you upgrade to a newer version.
> >
> > On 7月25日, 上午3時57分, Dianne Hackborn <hack...@android.com> 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 <joseph.w.e...@gmail.com
> >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
> android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com><android-developers%2Bunsubs
> cr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
> >
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
> >
> > > 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 android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to