naresh naresh - 10 months ago 57
Android Question

Check whether the SD card is available or not programmatically

My app is working for mobiles which have an SD card only. So programmatically I want to check if the SD card is available or not and how to find the SD card free space. Is it possible?

If yes, how do I do it?

Answer Source
Boolean isSDPresent = android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);

  // yes SD-card is present
 // Sorry