title: How to properly use Observable.zip() to combine multiple Retrofit call?
body: <p>I'm new to RxJava. My requirement is to do 3 retrofit call at start and wait until all of theme executed. Here is what i had implemented and Its working perfectly but I want know, is this code could be better than this and I implemented schedulers correctly or not.</p>
  
  <pre><code>public class CombinedGroupProductPage {
      private List&lt;Product&gt; groupProductList;
      private List&lt;Product&gt; relatedProductList;
      private List&lt;Product&gt; upsellProductList;
      //constructor and getter setters here
      .....
      .....
  }
  </code></pre>
  
  <blockquote>
    <p>Here is my implementation</p>
  </blockquote>
  
  <pre><code>private void getAllData() {
      loadingProgress.setVisibility(View.VISIBLE);
  
      ApiInterface apiService = ApiClient.getRxClient().create(ApiInterface.class);
      Observable&lt;List&lt;Product&gt;&gt; call = apiService.getRelatedProduct1(gson.toJson(model.getGroupedProducts()))
              .subscribeOn(Schedulers.newThread())
              .observeOn(Schedulers.io());
      Observable&lt;List&lt;Product&gt;&gt; call1 = apiService.getRelatedProduct1(gson.toJson(model.getRelatedIds()))
              .subscribeOn(Schedulers.newThread())
              .observeOn(Schedulers.io());
      Observable&lt;List&lt;Product&gt;&gt; call2 = apiService.getRelatedProduct1(gson.toJson(model.getUpsellIds()))
              .subscribeOn(Schedulers.newThread())
              .observeOn(Schedulers.io());
  
  
      Observable&lt;CombinedGroupProductPage&gt; combined = Observable.zip(call, call1, call2, new Function3&lt;List&lt;Product&gt;, List&lt;Product&gt;, List&lt;Product&gt;, CombinedGroupProductPage&gt;() {
  
          @Override
          public CombinedGroupProductPage apply(List&lt;Product&gt; list, List&lt;Product&gt; list2, List&lt;Product&gt; list3) throws Exception {
              return new CombinedGroupProductPage(list, list2, list3);
          }
      }).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread());
      combined.subscribe(new Observer&lt;CombinedGroupProductPage&gt;() {
          @Override
          public void onSubscribe(Disposable d) {
              // loadingProgress.setVisibility(View.VISIBLE);
          }
  
          @Override
          public void onNext(CombinedGroupProductPage combinedGroupProductPage) {
              Log.e("Tag", combinedGroupProductPage.toString());
              Log.e("Tag", combinedGroupProductPage.getGroupProductList().get(0).getName());
              loadingProgress.setVisibility(View.GONE);
          }
  
          @Override
          public void onError(Throwable e) {
  
          }
  
          @Override
          public void onComplete() {
  
          }
      });
  }
  </code></pre>
  
  <p>Please tell me this code can be reduced or not? Any help would be appreciated thanks.</p>