Android SDCard Check sdCardIsAvailable()

Here you can find the source of sdCardIsAvailable()

Description

sd Card Is Available

License

Apache License

Declaration

public static boolean sdCardIsAvailable() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import android.os.Environment;

public class Main {
    public static boolean sdCardIsAvailable() {
        String status = Environment.getExternalStorageState();
        if (!status.equals(Environment.MEDIA_MOUNTED)) {
            return false;
        }/*from  www.  j  a  va  2  s .  c o  m*/
        return true;
    }
}

Related

  1. getRealSizeOnPhone()
  2. getRealSizeOnSdcard()
  3. hasExternalCacheDir()
  4. hasSDCard()
  5. hasSDCard()
  6. isExternalStorageReadable()
  7. isExternalStorageWritable()
  8. hasMountSDCard()
  9. getExternalStorageFreeSize()