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 isSDCardMounted() {
    return Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED);
}

From source file:Main.java

public static boolean haveSDCard() {
    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
        return true;
    }//from www. ja  va 2  s  . c  o m
    return false;
}

From source file:Main.java

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

From source file:Main.java

public static String getCacheDir(Context ctx) {
    return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())
            || !Environment.isExternalStorageRemovable() ? ctx.getExternalCacheDir().getPath()
                    : ctx.getCacheDir().getPath();
}

From source file:Main.java

public static boolean isSDcardExist() {

    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 boolean hasSdcard() {
    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
        return true;
    } else {/*  www . j a v  a  2 s  .  c  o  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();
    }/*www .j  av  a2 s.  c  om*/
    return null;
}