Intercountry banner Avmob display at exit



  • Good afternoon! Please tell me how to do this. There's an app, when you leave it, you need to show admob an inter-country banner.

    I'm doing this:

    @Override
        public boolean onKeyDown(int keyCode, KeyEvent event)  {
            if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
                AdRequest adRequestInter = new AdRequest.Builder().build();
                mInterstitialAd.setAdListener(new AdListener() {
                    @Override
                    public void onAdLoaded() {
                        mInterstitialAd.show();
                    }
                });
                mInterstitialAd.loadAd(adRequestInter);
                return true;
            }
    
    return super.onKeyDown(keyCode, event);
    

    }`

    The announcement shall be displayed, but after its closure, the user shall remain in the annex, if it closes the announcement, it shall be necessary to withdraw from the annex. Thank you for the answer.



  • There must be an event following the closure of the announcement, and then you can close or just close the timer application, i.e., set a timer off the exit function in a second and inserted a notice of the announcement




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2