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 isExistSDcard() {
    String state = Environment.getExternalStorageState();
    if (state.equals(Environment.MEDIA_MOUNTED))
        return true;
    else {//from   w  ww  .jav a 2s  .c  o m
        return false;
    }
}

From source file:Main.java

public static boolean existSD() {
    String sdStatus = Environment.getExternalStorageState();
    if (sdStatus.equals(Environment.MEDIA_MOUNTED)) {
        return true;
    } else {/*w w  w  .  java 2 s. c  om*/
        return false;
    }
}

From source file:Main.java

public static boolean externalMounted() {
    String state = Environment.getExternalStorageState();
    if (state.equals(Environment.MEDIA_MOUNTED)) {
        return true;
    }/* w  w w  .  j  a va 2 s .co m*/
    return false;
}

From source file:Main.java

public static boolean isHasSdcard() {
    String status = Environment.getExternalStorageState();
    if (status.equals(Environment.MEDIA_MOUNTED)) {
        return true;
    } else {/*  w  w  w.  j  a v a  2s. c  o  m*/
        return false;
    }
}

From source file:Main.java

public static boolean checkSDCARD() {

    String status = Environment.getExternalStorageState();
    if (status.equals(Environment.MEDIA_MOUNTED)) {
        return true;
    }/*from   w ww  . jav  a 2  s  .  c om*/
    return false;
}

From source file:Main.java

public static boolean isSDCardState() {
    final String state = Environment.getExternalStorageState();
    return state.equals(Environment.MEDIA_MOUNTED);
}

From source file:Main.java

public static boolean sdCardIsAvailable() {
    String status = Environment.getExternalStorageState();
    return status.equals(Environment.MEDIA_MOUNTED);
}

From source file:Main.java

public static boolean isSDCARDMounted() {
    String status = Environment.getExternalStorageState();

    if (status.equals(Environment.MEDIA_MOUNTED))
        return true;
    return false;
}

From source file:Main.java

public static final boolean hasSDCard() {
    String status = Environment.getExternalStorageState();
    if (status.equals(Environment.MEDIA_MOUNTED)) {
        return true;
    } else {/* w w  w.  j a v a  2 s  .  c om*/
        return false;
    }
}

From source file:Main.java

private static boolean isExternalStorageReadable() {
    final String state = Environment.getExternalStorageState();
    if (Environment.MEDIA_MOUNTED.equals(state) || Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
        return true;
    }/*from   w ww  .ja  v a 2  s  .  c o  m*/
    return false;
}