private UploadResult upload(final String file){
  UploadResult result=httpPostRequest(file);
  int i=0;
  while (result != UploadResult.OK && i < MAX_RETRIES) {
    Log.w(TAG,"Upload failed: Retry " + i + ": "+ file);
    result=httpPostRequest(file);
    i++;
  }
  if (result != UploadResult.OK) {
    lastErrorMsg="Upload failed after " + i + " retries";
    Log.e(TAG,"Upload failed after " + i + " retries");
  }
  return result;
}

private UploadResult upload ( final String file ) { UploadResult result = httpPostRequest ( file ) ; int i = 0 ; while ( result != UploadResult . OK && i < MAX_RETRIES ) { Log . w ( TAG , "Upload failed: Retry " + i + ": " + file ) ; result = httpPostRequest ( file ) ; i ++ ; } if ( result != UploadResult . OK ) { lastErrorMsg = "Upload failed after " + i + " retries" ; Log . e ( TAG , "Upload failed after " + i + " retries" ) ; } return result ; }
uploads file . if upload hasn ' t succeeded on first attempt , upload is tried again max_retries times
