Home > DeveloperSection > Forums > How to check SDcard exist on Android device.
Pooja Malohtra
Pooja Malohtra

Total Post:47

Posted on    June-16-2015 10:40 PM

 Android Android  Android Emulator 

 1 Reply(s)
 541  View(s)
Rate this:
I want to create a folder in sdcard programmatically but before create folder I want to know sdcard is available or not.

Manoj Pandey

Total Post:26

Posted on    June-16-2015 10:50 PM

Hi Pooja, follow below code to check sd card available or not

boolean isSDPresent = android.os.Environment.getExternalStorageState()


if (isSDPresent) {

// yes SD-card is present

// create folder


else  {

// Sorry SD card is not available





Don't want to miss updates? Please click the below button!

Follow MindStick