code: public static void downloadFile(Context context, String fromUrl, File toFile,
        DownloadProgressListener listener, DownloadCancelListener cancelListener) throws IOException {
      downloadFileHandleRedirect(context, fromUrl, toFile, 0, listener, cancelListener);
    }
docs: Download a file at <code>fromUrl</code> to a file specified by <code>toFile</code>.
  
  @param fromUrl An url pointing to a file to download
  @param toFile File to save to, if existent will be overwrite
  @param listener Callback that notifies the download progress
  @param cancelListener Used to interrupt the download if necessary
  @throws java.io.IOException If fromUrl is invalid or there is any IO issue.