Java tutorial
//package com.java2s; //License from project: Open Source License import android.os.Environment; public class Main { /** * Helper Method to Test if external Storage is Available from * http://www.ibm.com/developerworks/xml/library/x-androidstorage/index.html */ public static boolean isExternalStorageAvailable() { boolean state = false; String extStorageState = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(extStorageState)) { state = true; } return state; } }