title: How to handle rotation with Retrofit and RxJava/RxAndroid in Activity?
body: <p>I read <a href="https://github.com/ReactiveX/RxJava/wiki/The-RxJava-Android-Module#fragment-and-activity-life-cycle" rel="nofollow noreferrer">here</a> that we can use some global cache in order to handle rotation.</p>
  
  <blockquote>
    <p>You can prevent this by using the cache or replay Observable operators, while making sure the Observable somehow survives the Activity life-cycle (for instance, by storing it in a global cache, in a Fragment, etc.)</p>
  </blockquote>
  
  <p>But how to achieve that? Somebody can point me to some example how to do it?
  Or maybe you know some better approach to handle configuration change?</p>
  
  <p>EDIT:</p>
  
  <p>For now I have found many ways, but I ended up with using RxBus realisation. Nice example of using RxBus you can find <a href="https://github.com/ryanhoo/StylishMusicPlayer" rel="nofollow noreferrer">here</a>.</p>