In my application I want to check whether the SD-Card is present (asin mounted) or not. When I try to run the application I am getting "sd-card is mounted" even though its not there.
Code
public boolean isSDCardPresent() {
return android.os.Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
}
The above code always returns true even if the sd-card is not present.
Try changing your method to this