Two possibilities come to mind.

First, perhaps the Dell Streak is one of the phones that has more than
one set of SD storage, and mounts the true external one on a
subirectory under getExternalStorageDirectory().

But the more likely possibility is that the phone has the problem that
this reviewer observed, with the storage sometimes not being seen:

http://ptech.allthingsd.com/20100811/dells-streak-a-tiny-tablet-that-takes-calls-too/

That would seem to fit the symptoms better -- sometimes it working,
sometimes not.

On Aug 15, 12:59 am, Fabrizio Giudici <fabrizio.giud...@tidalwave.it>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello.
>
> My application allow to download files and store them on the external
> card. To avoid filling it, I've implemented a safety check so it
> prevents downloading when the free space is less than 20MB. The
> computation of the free space is done by:
>
>     public synchronized long getFreeSpace()
>       {
>         if (statFs == null)
>           {
>             statFs = new
> StatFs(getExternalStorageDirectory().getAbsolutePath());
>           }
>
>         return statFs.getAvailableBlocks() * statFs.getBlockSize();
>       }
>
> which I presume is correct. In fact, it works in all my tests and for
> what I can say for the 99% of users. But a single user notified me
> that my app is constantly giving the "card full" message, as if the
> above method didn't work. He also told me that the problem went away
> after a while, and returned after upgrading a new release of my app.
> The user seems an advanced one, and I think he's able to check and
> correctly manage the contents of his external card. He reported that
> the card has more than 1.4GB free on the card. Are you aware of any
> specific issue or bug? The smartphone of the user is a Dell Streak
> with Android 1.6. Thanks.
>
> - --
> Fabrizio Giudici - Java Architect, Project Manager
> Tidalwave s.a.s. - "We make Java work. Everywhere."
> java.net/blog/fabriziogiudici -www.tidalwave.it/people
> fabrizio.giud...@tidalwave.it
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkxnnlYACgkQeDweFqgUGxcjjACgqoLP3HiHB5r8lsQytu/59Xdb
> bE8An1t/mt2gKIdisyZc1sI3/lGHp8dh
> =dZLt
> -----END PGP SIGNATURE-----

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