title: RxAndroid - execute another request based on a specific result?
body: <p>i am using RxAndroid/RxJava for the first time and trying to figure out how to implement a chain of requests but each next request made is dependent on the result of the other.</p>
  
  <p>example:</p>
  
  <pre><code>private Boolean isUserEligible(){
          ..
      }
  
      private String registerDevice()
          ..
      }
  
      private String login(){
          ..
      }
  </code></pre>
  
  <p>As far as i know, the Observable can only execute all of the above methods or one by one like below:</p>
  
  <pre><code> // Fetch from both simultaneously
      Observable&lt;String&gt; zipped
              = Observable.zip(isUserEligible(), registerDevice(),login(), new Func2&lt;String, String, String&gt;() {
  
      });
  
      Observable&lt;String&gt; concatenated = Observable.concat(isUserEligible(), registerDevice(),login());    
  </code></pre>
  
  <p>what if i want to do something like this</p>
  
  <pre><code>//execute usUserEligible first and if eligible, execute registerDevice, else execute login().
  </code></pre>
  
  <p>Thanks in advance</p>