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 exterStorageReady() {
    return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())
            || !Environment.isExternalStorageRemovable();
}

From source file:Main.java

public static Boolean internalStorageExists() {
    return (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()));
}

From source file:Main.java

public static boolean isSDCardAvailable() {
    if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
        return true;
    } else {/*from  w ww .j  a v  a  2 s.c  om*/
        return false;
    }
}

From source file:Main.java

public static boolean isSdReady() {
    if (Environment.MEDIA_MOUNTED.equalsIgnoreCase(Environment.getExternalStorageState())) {
        return true;
    } else {/*from w  ww  .  ja  v a  2s  .com*/
        return false;
    }
}

From source file:Main.java

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

From source file:Main.java

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

From source file:Main.java

public static boolean isStorageExists() {
    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
        return true;
    }/*  w  w  w . j  av  a 2 s  .co m*/
    return false;
}

From source file:Main.java

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

From source file:Main.java

public static boolean hasSDCard(Context context) {
    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
        return true;
    }/*from   w  ww  .j  a  va2 s.co  m*/
    return false;
}

From source file:Main.java

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