title: How to finish current activity and launch a new activity Rx way?
body: <p>I want to do the following but in Rx. The <code>startActivity(intent)</code> is guaranteed to be called since <code>finish()</code> is just an async call queued:</p>
  
  <pre><code>private fun launchNewActivity(){
    ...
    finish()
    startActivity(intent)
  }
  </code></pre>
  
  <p>So in Rx way, I'm doing something like this, where both are packaged in their own observables (requirement): </p>
  
  <pre><code>private fun launchNewActivity(): Observable&lt;Any&gt;{
    ...
    return Observable.concat(
      Observable.just(finish())
      Observable.just(startActivity(intent))
      ...
    )
  }
  </code></pre>
  
  <p>However, I'm worried in the Rx way, the activity <em>could</em> finish before startActivity is called. Would that happen? </p>