In my splash screen, I want to check if the phone has a SDCard. The Boolean statement is beneath:
Boolean isSDPresent = android.os.Environment.getExterna
Shouldn't it be:
boolean isPresent = Environment.getExternalStorageState().equals(
Environment.MEDIA_MOUNTED
);
As the documentation states for Environment.getExternalStorageState():
Gets the current state of the primary "external" storage device.
And for the Environment.MEDIA_MOUNTED-constant:
getExternalStorageState()
returnsMEDIA_MOUNTED
if the media is present and mounted at its mount point with read/write access.
And this will work from API Level 1+