private void setUpUploadingAgain(PictureFile failedFile) {

    if (failedFile != null) {
      String filename = failedFile.getFilename();
      if (Constants.DEBUG) {
        ToastHelper.showToast(getApplicationContext(), "FAILED " + failedFile.getFilename());
      }
      Log.w(LOG_TAG, "FAILED " + filename);
      failedFile.setStatus(DAOHelper.FILE_STATUS_IN_QUEUE);
      daoHelper.pictureFileDao.update(failedFile);
      daoHelper.onPictureFilesUpdated();
    }
  }
  private void onUploadCompleted(PictureFile uploadedFile) {

    if (uploadedFile != null) {
      if (Constants.DEBUG) {
        ToastHelper.showToast(getApplicationContext(), "COMPLETED " + uploadedFile.getFilename());
      }
      Log.w(LOG_TAG, "COMPLETED " + uploadedFile.getFilename());
      uploadedFile.setStatus(DAOHelper.FILE_STATUS_UPLOADED);
      uploadedFile.setIsDeleted(false);
      daoHelper.pictureFileDao.update(uploadedFile);
      daoHelper.onPictureFilesUpdated();
    }

    uploadCycleFinished();
  }