title: Exit app on double tap (android app)
body: <p>Am totally stuck here with the following code.</p>
  
  <p>Where do I need to paste this code exactly in c# script in unity...</p>
  
  <p>Because am confused that we have to write </p>
  
  <pre><code>using unityengine;
  using system.collections,
  </code></pre>
  
  <p>bla blaa so what is the code goes before override </p>
  
  <pre><code>@Override
  public void onBackPressed()
  {
      if (back_pressed + 2000 &gt; System.currentTimeMillis()) 
          super.onBackPressed();
      else 
          Toast.makeText(getBaseContext(), "Press once again to exit!", Toast.LENGTH_SHORT).show();
          back_pressed = System.currentTimeMillis();
      }
  }
  </code></pre>