Android examples for Hardware:SD Card
Check if Sd Card can be used
//package com.java2s; import android.os.Environment; public class Main { public static boolean IsCanUseSdCard() { try {/*w ww . j a v a 2 s . co m*/ return Environment.getExternalStorageState().equals( Environment.MEDIA_MOUNTED); } catch (Exception e) { e.printStackTrace(); } return false; } }