title: How to show progress with retrofit 2 while uploading?
body: <p>I am uploading a video to youtube successfully with multipart form data  retrofit 2 . </p>
  
  <p>I want to show progress while uploading. How can I do this ?</p>
  
  <p>Any advice or sample code please ? I searched but couldn't found any solution about this.</p>
  
  <p>when user click the upload button, get token func is calling and video is starting to upload.</p>
  
  <p><strong>here is my upload func.</strong></p>
  
  <pre><code>public void getToken(final String title) {
      progessBlackView.setVisibility(View.VISIBLE);
      showProgressDialog("Loading");
      ApiInterface apiService = ApiClient.getClient().create(ApiInterface.class);
      Call&lt;Token&gt; call = apiService.GETTOKEN(tinyDb.getString(Constant.wkey));
      call.enqueue(new Callback&lt;Token&gt;() {
          @Override
          public void onResponse(Call&lt;Token&gt; call, Response&lt;Token&gt; response) {
              hideProgressDialog();
              if (response != null &amp;&amp; response.body() != null) {
                  if (response.body().getEx() == null) {
                      String token = response.body().getToken();
                      YouTubeAPIClient.YouTubeAPIService service = YouTubeAPIClient.getClient(token).create(YouTubeAPIClient.YouTubeAPIService.class);
                      JsonObject snippetJson = new JsonObject();
                      snippetJson.addProperty("title", title);
                      snippetJson.addProperty("description", "");
                      JsonObject statusJson = new JsonObject();
                      statusJson.addProperty("privacyStatus", "unlisted");
                      MediaType jsonM = MediaType.parse("application/json");
                      JsonObject partJson = new JsonObject();
                      partJson.add("snippet", snippetJson);
                      partJson.add("status", statusJson);
                      RequestBody part = RequestBody.create(jsonM, partJson.toString());
                      MultipartBody.Part video = prepareFilePart("video", videoFileName);
                      progessBlackView.setVisibility(View.VISIBLE);
                      Call&lt;JsonObject&gt; call2 = service.upload(part, video);
                      call2.enqueue(new Callback&lt;JsonObject&gt;() {
                          @Override
                          public void onResponse(Call&lt;JsonObject&gt; call, Response&lt;JsonObject&gt; response) {
                              if(response.code() == 200){
                                  Log.d(TAG, "onResponse: " + response.body());
                                  JsonElement tmp = response.body().get("id");
                                  if(tmp  != null) {
                                      String vkey = tmp.toString();
                                      vkey = vkey.replace("\"","");
                                      String item = "";
                                      for (int i = 0; i &lt; mtagIds.size(); i++) {
                                          item = item + mtagIds.get(i);
                                          if (i != mtagIds.size() - 1) {
                                              item = item + ", ";
                                          }
                                      }
                                      String videoKey = vkey.toString();
                                      JoinAllAllowedInno selectedJoin = DataHolder.getInstance().getSelectedJoin();
                                      addVideo(selectedJoin.getInnoId(), videoKey, title, item);
                                  }
                                  else {
                                      getAlertError((String) getText(R.string.videoNotFound));
                                  }
                                  progessBlackView.setVisibility(View.GONE);
                              }
                          }
  
                          @Override
                          public void onFailure(Call&lt;JsonObject&gt; call, Throwable t) {
                              Log.i("YoutubeUpload", t.getMessage());
                              getAlertError((String) getText(R.string.videoNotFound));
                              progessBlackView.setVisibility(View.GONE);
                          }
                      });
  
                  } else {
                      getAlertError(response.body().getEx());
                  }
              }
          }
  
          @Override
          public void onFailure(Call&lt;Token&gt; call, Throwable t) {
              hideProgressDialog();
              Log.e(CLASS_NAME, t.toString());
          }
      });
  }
  </code></pre>