01-20-2009 04:06 PM
Has anyone found a way to discover details about the SD card? Specifically:
A) If an SD card is available/inserted. (SDCardInfo.isAvailable())
B) What the capacity of the card is if inserted (SDCardInfo.getSize())
C) How much space is left on the SD card. (SDCardInfo.getRemaininRoom())
Thanks in advance.
Solved! Go to Solution.
01-20-2009 04:14 PM
You'll want to look at FileConnection and FileSystemRegistry.
You can use FileSystemRegistry.listRoots() to get a list of all of the root directories you can write to - You're looking for one that has "sdcard/" in it.
Then you can use a fileconnection on that root directory, and call the methods "availableSize", "totalSize", and "usedSize" - Those should give you what you're looking for.