Resolve! “Interstitial ads that appear after the user has exited the app” Issue in Ionic 3 Application

The latest update of one of my application got suspended by Google team due to some issue related to ads shown in the application. The issue was with Interstitial type of ads which I was showing in application after view change.

But I received following mail regarding the rejection of that update.

Publishing Status
Publishing status: Rejected
After review, your app has been rejected and wasn’t published due to a policy violation. If you submitted an update, the previous version of your app is still available on Google Play.
Reasons of violation
Issue: Violation of Interfering with Apps, Third-party Ads, or Device Functionality policy
Ads should not be shown in a way that results in inadvertent clicks.For example, we don’t allow:

  • Interstitial ads that appear after the user has exited the app

After getting this email I was like “Why me?” but after some research I found many developers facing a similar type of rejections. I tried to reproduce this issue in development mode and luckily it was reproduced some of the times.

Why Ads Show up Even if user Exit App?

This happens if set autoShow options to true, then prepare method starts to load the ad. In that case, if a user leaves the app by pressing home button then app minimizes but as soon as the ad is loaded, it pops up on screen. This type of behavior is not acceptable by terms for using ads in the application.

Solution:

For using Interstitial type of ads in an application we need to follow a bit of tricky method which we are going to discuss.

Note: Visit this link, If you want more information on How to add Admob Ads in Ionic 3/4 Application using AdMob Free Plugin

In the configuration, we need to set autoShow to false. On application load event which is platform.ready() we will first prepare Interstitial ad which will load the Ad. After that we can call show() method to display it after checking if Ad is ready by using isReady() method. After the user closes the app we can call the prepare() method again to load out interstitial ad again.

Let’s check the code

This code will show up Interstitial ads right away if the ad is loaded without any delay. Thus removes chances of ads showing up after user exit application.

 

Leave a Reply

avatar
  Subscribe  
Notify of