is External Storage Available - Android App

Android examples for App:External Storage

Description

is External Storage Available

Demo Code


//package com.java2s;
import android.os.Environment;

public class Main {
    public static boolean isExternalStorageAvailable() {
        String extStorageState = Environment.getExternalStorageState();
        if (Environment.MEDIA_MOUNTED.equals(extStorageState)) {
            return true;
        }//w  w  w.  j  av  a2 s  . c  o m
        return false;
    }
}

Related Tutorials