Android examples for android.os:SD Card
get Save Path on SD Card
import java.io.File; import android.os.Environment; public class Main { public static File getSavePath() { File path;/*from w w w .ja v a2 s .c om*/ if (hasSDCard()) { // SD card path = new File(getSDCardPath() + "/remote/"); path.mkdir(); } else { path = Environment.getDataDirectory(); } return path; } public static boolean hasSDCard() { String status = Environment.getExternalStorageState(); return status.equals(Environment.MEDIA_MOUNTED); } public static String getSDCardPath() { File path = Environment.getExternalStorageDirectory(); return path.getAbsolutePath(); } }