title: how to show admob interstitial on app exit
body: <p>how to show ad mob interstitial ad on app exit.
  I tried it using onBackPressed() method but getting errors
  Code for interstitial ad</p>
  
  <pre><code>interstitial = new InterstitialAd(this, "AD_ID");
  
  
      AdRequest adRequest = new AdRequest();
  
  
      interstitial.loadAd(adRequest);
  
  
      interstitial.setAdListener(this);
    }
      @Override
        public void onReceiveAd(Ad ad) {
  
          if (ad == interstitial) {
            interstitial.show();
          }
  
      }
  </code></pre>
  
  <p>What is the correct way to do it.</p>