title: how can i display progress bar for dailymotion cloud uploading
body: <p>I am using Dailymotion cloud in my android app to upload videos to server.
  i want to display progress bar while uploading but i don't know how can i get byte by byte value to update progress bar.</p>
  
  <p>This is dailymotion cloud api link <a href="https://www.dmcloud.net/doc/api/sdk-java.html" rel="nofollow">Dailymotion cloud api link</a></p>
  
  <p>While searching on internet i found this <a href="http://objectmix.com/java/785756-httpclient-progressbar.html" rel="nofollow">progress bar in java</a> but i don't know how can i implement into this method of dailymotion api.</p>
  
  <p>I am using async task to display progress bar
  Here is android code for uploading </p>
  
  <pre><code>      try
          {
              CloudKey cloud = new CloudKey(user_id, api_key);
              File f = new File(selectedVideoPath);
              String media_id = cloud.mediaCreate(f);
              System.out.println(media_id);
              Log.d("Testing", "media_id is"+media_id);
          }
  </code></pre>
  
  <p>And here is Dailymotion API's Cloud.class mediacreate() in which i want to display progress bar .. any idea </p>
  
  <pre><code>public String mediaCreate(File f) throws Exception
  {
      return this.mediaCreate(f, null, null);
  }
  
  public String mediaCreate(File f, DCArray assets_names, DCObject meta) throws Exception
  {
      String upload_url = this.fileUpload();
  
      PostMethod filePost = null;
      int status;
      try
      {
          filePost = new PostMethod(upload_url);
  
          Part[] parts = {
              new FilePart("file", f)
          };
  
          filePost.setRequestEntity(new MultipartRequestEntity(parts, filePost.getParams()));
  
          HttpClient client = new HttpClient();
          client.getHttpConnectionManager().getParams().setConnectionTimeout(5000);
           status = client.executeMethod(filePost);
  
          if (status == HttpStatus.SC_OK)
          {
              ObjectMapper mapper = new ObjectMapper();
              DCObject json_response = DCObject.create(mapper.readValue(filePost.getResponseBodyAsString(), Map.class));
              return this.mediaCreate(json_response.pull("url"), assets_names, meta);
          }
          else
          {
              throw new DCException("Upload failed.");
          }
      }
      catch (Exception e)
      {
          throw new DCException("Upload failed: " + e.getMessage());
      }
      finally
      {
          if (filePost != null)
          {
              filePost.releaseConnection();
          }
      }
  }
  </code></pre>