title: Handle back button android (onBackPressed)
body: <p>i want to create simple android aplication to streaming video where url get from QR<br>
  this is my app flow : scanner - get url - streaming video</p>
  
  <p>but if user press back button 
  i wanna it become like this :
  1. if app already had url / streaming video already begin, when user press back button....app back scan QR image state again
  2. if app still in scanner state, when user press back button app do default android process when app get button back pressed (moveToBack or close)</p>
  
  <p>i try with this code, but no luck</p>
  
  <pre><code>@Override
  public void onBackPressed() {
      if (flagGetScanningResult) {
          flagGetScanningResult = false;
          launchScanner();
      }
  
      super.onBackPressed();
  }
  </code></pre>