Here you can find the source of hasSDCard()
public static boolean hasSDCard()
//package com.java2s; import android.os.Environment; public class Main { public static boolean hasSDCard() { return Environment.MEDIA_MOUNTED.equals(Environment .getExternalStorageState()); }// w w w . j a va2s .c om }