title: WebView doesn't Go Back on Back Button Click
body: <p>I have a WebView App which browses web pages of a website. I have used the following lines of codes to use the back button to navigate to the previous web page and double back button click to quit the app.</p>
  
  <p>The double back button tap to quit the app is working fine but the app doesn't go back on single back button click. What's the issue here?</p>
  
  <pre><code>private static final int TIME_DELAY = 2000;
          private static long back_pressed;
          @Override
          public void onBackPressed() {
              if(myWebView.canGoBack()) {
                  myWebView.goBack();
              }
  
              if (back_pressed + TIME_DELAY &gt; System.currentTimeMillis()) {
                  super.onBackPressed();
              } else {
                  Toast.makeText(getBaseContext(), "Press once again to exit!",
                          Toast.LENGTH_SHORT).show();
              }
              back_pressed = System.currentTimeMillis();
          }
  </code></pre>