Java tutorial
//package com.java2s; import android.annotation.TargetApi; import android.os.Build; import android.os.Environment; public class Main { @TargetApi(Build.VERSION_CODES.GINGERBREAD) public static boolean isExternalStorageRemovable() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { return Environment.isExternalStorageRemovable(); } return true; } }