public static boolean enoughSpaceOnSdCard(long updateSize){
  String status=Environment.getExternalStorageState();
  if (!status.equals(Environment.MEDIA_MOUNTED))   return false;
  return (updateSize < getRealSizeOnSdcard());
}

public static boolean enoughSpaceOnSdCard ( long updateSize ) { String status = Environment . getExternalStorageState ( ) ; if ( ! status . equals ( Environment . MEDIA_MOUNTED ) ) return false ; return ( updateSize < getRealSizeOnSdcard ( ) ) ; }
checks if there is enough space on sdcard
