-----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
[email protected]
-----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 [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