title: Subscribe to an observable when it's already running
body: <p>I want to subscribe to an observable when it's already running.</p>
  <p>E.g. I create an observable to emit some upload percentage somewhere in the app, and start that upload. When users launch another app screen, I need to show a progress bar of what's happing. What's the best way to do this?</p>
  <p>This is my current code</p>
  <pre><code>private Observable&lt;UploadPercentage&gt; uploadFile(File file) {
      ProgressRequestBody fileUploadBody = new ProgressRequestBody(file, &quot;multipart/form-data&quot;);
  
      MultipartBody.Part multipartFileBody =
              MultipartBody.Part.createFormData(
                      &quot;file&quot;,
                      file.getName(),
                      fileUploadBody);
  
      InterfaceUpload apiService = retrofit.create(InterfaceUpload.class);
  
      Response&lt;Void&gt; emptyResponse = Response.success(null);
  
      Observable&lt;Response&lt;Void&gt;&gt; apiRequestObservable = apiService.uploadFile(
                      multipartFileBody
              )
              // It starts by emitting an empty response to follow the
              // percentage even though the api still have not responded
              .startWith(Observable.just(emptyResponse));
  
      Observable&lt;Integer&gt; percentageUploadedObservable = fileUploadBody.getProgressSubject();
  
      return Observable.combineLatest(
              percentageUploadedObservable,
              apiRequestObservable,
              (percentage, apiResponse) -&gt;
              new UploadPercentage(percentage, apiResponse, file));
  }
  </code></pre>