private boolean checkExternalStorageAndNotify(String filename,String fullDirPath,String externalStorageStatus){
  if (fullDirPath == null) {
    Log.e(TAG,"Download failed: no SD card");
    alertDownloadFailure(filename);
    return false;
  }
  if (!externalStorageStatus.equals(Environment.MEDIA_MOUNTED)) {
    if (externalStorageStatus.equals(Environment.MEDIA_SHARED)) {
      Log.e(TAG,"Download failed: SD card unavailable");
    }
 else {
      Log.e(TAG,"Download failed: no SD card");
    }
    alertDownloadFailure(filename);
    return false;
  }
  return true;
}

private boolean checkExternalStorageAndNotify ( String filename , String fullDirPath , String externalStorageStatus ) { if ( fullDirPath == null ) { Log . e ( TAG , "Download failed: no SD card" ) ; alertDownloadFailure ( filename ) ; return false ; } if ( ! externalStorageStatus . equals ( Environment . MEDIA_MOUNTED ) ) { if ( externalStorageStatus . equals ( Environment . MEDIA_SHARED ) ) { Log . e ( TAG , "Download failed: SD card unavailable" ) ; } else { Log . e ( TAG , "Download failed: no SD card" ) ; } alertDownloadFailure ( filename ) ; return false ; } return true ; }
check the external storage and notify user on error .
