Example usage for android.os Environment MEDIA_MOUNTED

List of usage examples for android.os Environment MEDIA_MOUNTED

Introduction

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

Prototype

String MEDIA_MOUNTED

To view the source code for android.os Environment MEDIA_MOUNTED.

Click Source Link

Document

Storage state if the media is present and mounted at its mount point with read/write access.

Usage

From source file:Main.java

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

From source file:Main.java

public static boolean checkSDCardExist() {
    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
        return true;
    } else {//  ww  w .jav a 2s  .co  m
        return false;
    }
}

From source file:Main.java

public static boolean isExistsSdCard() {
    if (Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) {
        return true;
    } else {//from  w  ww .  jav  a 2s.co m
        return false;
    }
}

From source file:Main.java

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

From source file:Main.java

public static boolean isExistSDCard() {
    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
        return true;
    } else {/*from  www . ja  v  a 2  s .co  m*/
        return false;
    }

}

From source file:Main.java

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

From source file:Main.java

public static String getSDPath() {
    if (android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) {
        return Environment.getExternalStorageDirectory().getPath();
    }//from w  w w . j  a  v a 2 s .com
    return "";
}

From source file:Main.java

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

From source file:Main.java

public static boolean isSDCardMounted() {
    return Environment.getExternalStorageState().equalsIgnoreCase(Environment.MEDIA_MOUNTED);
}

From source file:Main.java

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