title: How to stop an RxJava observable from emitting items. Tried to unsubscribe but it kept going
body: <p>In my code I create an observable and keep a reference to the subscription object.
  When I start the app it prints all the numbers from 1 to 1000000
  If I minimize the activity, I ubsubscribe from the subscription in <code>onPause</code>
  However, the LogCat keeps printing numbers. How do I stop it from doing so?</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      private Subscription printingNumbers;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          printingNumbers = Observable
                            .range(1, 500000)
                            .map(i -&gt; i*2)
                            .subscribe(i -&gt; System.out.println(i));
      }
  
      @Override
      protected void onPause() {
          super.onPause();
          printingNumbers.unsubscribe();
      }
  
  }
  </code></pre>