get Sd card Path : SDCard « Hardware « Android






get Sd card Path

   
import java.io.File;

import android.os.Environment;

class Common {
  public static String getSdcardPath() {
    File sdDir = null;
    boolean sdCardExist = Environment.getExternalStorageState().equals(
        android.os.Environment.MEDIA_MOUNTED); 
    if (sdCardExist) {
      sdDir = Environment.getExternalStorageDirectory();
    }

    return sdDir.toString() + "/";
  }
}

   
    
    
  








Related examples in the same category

1.Load image from mounted sdcard
2.Uri for sdcard
3.Get SDCard Megs Free
4.SDCard File Util
5.create File In SDCard
6.export the current database to the SDcard