Example usage for android.os Environment getExternalStorageState

List of usage examples for android.os Environment getExternalStorageState

Introduction

In this page you can find the example usage for android.os Environment getExternalStorageState.

Prototype

public static String getExternalStorageState() 

Source Link

Document

Returns the current state of the primary shared/external storage media.

Usage

From source file:Main.java

public static boolean isSdCardExists() {
    return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
}

From source file:Main.java

public static boolean hasSdcard() {
    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
        return true;
    } else {//from  ww  w  . ja va2  s  .  co  m
        return false;
    }
}

From source file:Main.java

private static boolean isSDAvailable() {
    return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
}

From source file:Main.java

public static boolean isSdcardExists() {
    return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
}

From source file:Main.java

public static String getSDCardDir() {
    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
        return Environment.getExternalStorageDirectory().getPath();
    }//from  w  w w . j  a  va2s.  c  o m
    return null;
}

From source file:Main.java

public static boolean isSdcardAviable() {
    return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
}

From source file:Main.java

public static boolean getIsSDCardExit() {
    return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
}

From source file:Main.java

public static Boolean SDcardCanUse() {
    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
        return true;
    } else {//from w  w w . j  a  v a2s  . c o m
        return false;
    }
}

From source file:Main.java

public static boolean isSDCardExists() {
    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
        return true;
    }/*from   w  w w  . j  a  va 2 s . c  o m*/
    return false;
}

From source file:Main.java

public static boolean isExternalSDExist() {
    return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
}