Hi folks,
How do you check if the SD card is full or not so that your application can decide if it can continue to do its job i.e. write to external storage or notify the user that storage has run out of space.
Cheers
Hi folks,
How do you check if the SD card is full or not so that your application can decide if it can continue to do its job i.e. write to external storage or notify the user that storage has run out of space.
Cheers
Hi Namratha. I think you can use this statement to do with your problem. this cant check whether or no enough capacity of sdcard. if(android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)){ //to do something in here }
use StatFs and pass the path of the external storage directory to the constructor and you can call functions such as getAvailableBlocks() and getBlockSize() on the StatFs object.