is SD Card Available - Android Hardware

Android examples for Hardware:SD Card

Description

is SD Card Available

Demo Code


//package com.java2s;

import android.os.Environment;

public class Main {
    public static boolean isSDCardAvailable() {
        if (Environment.MEDIA_MOUNTED.equals(Environment
                .getExternalStorageState())) {
            return true;
        } else {/*from w  w w  . ja  va 2  s.  co  m*/
            return false;
        }
    }
}

Related Tutorials