Java tutorial
//package com.java2s; import java.net.URI; import android.os.Environment; public class Main { public static URI getSDCardUri() { if (existSDCard()) return Environment.getExternalStorageDirectory().toURI(); else return null; } public static boolean existSDCard() { return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()); } }