title: DropboxAPI putFile Progress value returned is invalid
body: <p>I am Integrating Dropbox sdk in my sample application. Everything works perfectly except showing upload progress on screen. I am using DropboxAPI <a href="https://www.dropboxstatic.com/static/developers/dropbox-android-sdk-1.6.3-docs/com/dropbox/client2/DropboxAPI.html#putFile(java.lang.String,%20java.io.InputStream,%20long,%20java.lang.String,%20com.dropbox.client2.ProgressListener)" rel="nofollow">putFile</a> API to file on Dropbox.This API provides ProgressListener which publish progress in onProgress method. The issue I am getting over here is it seems that onProgress doesnt returns the correct values. for e.g below are the logs which I am seeing. It just stops after showing last log and file is uploaded successfully. I am trying to find a callback where It would let me know that file upload is complete.</p>
  
  <pre><code>04-20 09:51:30.041  27244-27452/google.dropboxfilesample I/vipul﹕ 2048&lt;===&gt;2330600
  04-20 09:51:31.801  27244-27452/google.dropboxfilesample I/vipul﹕ 327680&lt;===&gt;2330600
  04-20 09:51:32.851  27244-27452/google.dropboxfilesample I/vipul﹕ 473088&lt;===&gt;2330600
  04-20 09:51:33.851  27244-27452/google.dropboxfilesample I/vipul﹕ 604160&lt;===&gt;2330600
  04-20 09:51:34.561  27244-27452/google.dropboxfilesample I/vipul﹕ 753664&lt;===&gt;2330600
  04-20 09:51:35.211  27244-27452/google.dropboxfilesample I/vipul﹕ 868352&lt;===&gt;2330600
  04-20 09:51:35.881  27244-27452/google.dropboxfilesample I/vipul﹕ 1011712&lt;===&gt;2330600
  04-20 09:51:36.381  27244-27452/google.dropboxfilesample I/vipul﹕ 1277952&lt;===&gt;2330600
  04-20 09:51:36.911  27244-27452/google.dropboxfilesample I/vipul﹕ 1441792&lt;===&gt;2330600
  04-20 09:51:37.701  27244-27452/google.dropboxfilesample I/vipul﹕ 1761280&lt;===&gt;2330600
  04-20 09:51:38.201  27244-27452/google.dropboxfilesample I/vipul﹕ 2201600&lt;===&gt;2330600
  
  
  private void uploadFile() throws FileNotFoundException, DropboxException {
      final File file = new File(Environment.getExternalStorageDirectory(), "sample.mp3");
      final ProgressDialog progressDialog = new ProgressDialog(this);
      progressDialog.setProgressStyle(progressDialog.STYLE_HORIZONTAL);
      progressDialog.setMax((int) file.length());
      progressDialog.show();
      new Thread() {
        @Override
          public void run() {
              try {
                  FileInputStream inputStream = new FileInputStream(file);
                  final DropboxAPI.Entry response = mDBApi.putFile("/sample.mp3", inputStream,
                      file.length(), null, new ProgressListener() {@
                          Override
                          public void onProgress(final long bytes, final long total) {
                              Log.d("vipul", bytes + "&lt;===&gt;" + total);
                          }
                      });
                  Log.d("vipul", "The uploaded file's rev is: " + response.rev);
              } catch (DropboxException dropboxException) {
                  if (progressDialog.isShowing()) {
                      progressDialog.dismiss();
                  }
                  dropboxException.printStackTrace();
              } catch (FileNotFoundException e) {
                  if (progressDialog.isShowing()) {
                      progressDialog.dismiss();
                  }
                  e.printStackTrace();
              }
          }
      }.start();
  }
  </code></pre>
  
  <p>It would be great if someone could point me to correct direction.
  Thanks </p>