Android examples for Hardware:SD Card
Checks if media storage (SD card) is available.
//package com.java2s; import android.os.Environment; public class Main { /**// www. j a v a 2 s. c o m * Checks if media storage (SD card) is available. * @return <code>true</code> if available */ public static boolean isMediaStorageAvailable() { return (Environment.getExternalStorageState() .equals(Environment.MEDIA_MOUNTED)); } }