How do I know if the SD card is present or not through Android code/API?

  • Thread starter Thread starter AC Question
  • Start date Start date
A

AC Question

how to know SD card is present or not through android code/API?

I have a requirement to find whether SD card is present or not in phone in an Android application.
I have used following to check it, but it returns true, even if SD card is not present.

android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)

I did not find any proper solution which will work on different OEM's phone and tablet.

Quick help will be appreciated!
 

Latest posts

Trending Posts

Forum statistics

Threads
956,347
Messages
6,967,699
Members
3,163,516
Latest member
KidColoringPage