HOW TO CHECK SDCARD EXIST ON ANDROID DEVICE.

Pooja Malohtra

Total Post:47

Points:331
Posted by  Pooja Malohtra
 1135  View(s)
Ratings:
Rate this:
I want to create a folder in sdcard programmatically but before create folder I want to know sdcard is available or not.
  1. Manoj Pandey

    Post:26

    Points:188
    Re: How to check SDcard exist on Android device.

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

    boolean isSDPresent = android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);
    if (isSDPresent) {
    // yes SD-card is present
    // create folder
    }
    else  {
    // Sorry SD card is not available
    }

     

     

     

      Modified On Apr-10-2018 12:17:34 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!