protected boolean checkExternalStorageAndNotify(String fileName){
  if (fileName != null && fileName.startsWith("null")) {
    alertDownloadFailure(R.string.download_no_sdcard_dlg_title);
    return false;
  }
  String status=Environment.getExternalStorageState();
  if (!status.equals(Environment.MEDIA_MOUNTED)) {
    int title;
    if (status.equals(Environment.MEDIA_SHARED)) {
      title=R.string.download_sdcard_busy_dlg_title;
    }
 else {
      title=R.string.download_no_sdcard_dlg_title;
    }
    alertDownloadFailure(title);
    return false;
  }
  return true;
}

protected boolean checkExternalStorageAndNotify ( String fileName ) { if ( fileName != null && fileName . startsWith ( "null" ) ) { alertDownloadFailure ( R . string . download_no_sdcard_dlg_title ) ; return false ; } String status = Environment . getExternalStorageState ( ) ; if ( ! status . equals ( Environment . MEDIA_MOUNTED ) ) { int title ; if ( status . equals ( Environment . MEDIA_SHARED ) ) { title = R . string . download_sdcard_busy_dlg_title ; } else { title = R . string . download_no_sdcard_dlg_title ; } alertDownloadFailure ( title ) ; return false ; } return true ; }
check the external storage and notify user on error .
