public String getMountedExternalStorageDirectoryPath ( ) { String path = null ; String state = Environment . getExternalStorageState ( ) ; if ( state . equals ( Environment . MEDIA_MOUNTED ) || state . equals ( Environment . MEDIA_MOUNTED_READ_ONLY ) ) { path = absPath ( Environment . getExternalStorageDirectory ( ) ) ; } return path ; }
Gets the path to the external storage directory only if mounted .