Interstitial showing during gameplay due to load delay

In my game I am trying to display an interstitial ad after the player completes a level/puzzle so during the scene creation I call ads.show to display the ad. The problem is that at time the ad will be delayed long enough that the player clicks “next” and starts playing the next puzzle and the ad will finally load and popup while they are playing. I really don’t want ads interrupting the gameplay.

Does anyone have any ideas on how to fix this? Is there a way to stop an ad from showing by cancelling the request if it doesn’t load in time? 

The one idea I do have is to only load the scene once the ad shows or fails, but sometimes the delay can be very long and if that happened after every level then I feel like the players would get too annoyed. Is this my only option in this case though?

Thanks in advance for any suggestions and help that you may give.

You should be able to call ad.hide() to hide the ad.  The other thing you can do is not enable the next button until you show the ad has completed or some time out period has expired.  The ad should support a call back listener that lets you know if the ad displayed or failed in which case you can then react to the situation.

Rob

I call ad.hide() when the scene exits and goes back to the game and it still shows up during the game. I assume for hide to work the interstitial ad has to be already loaded? If so then the hide function wont fix my problem since the ad will still interrupt my gameplay.

If I use a time out period to activate the button the ad may still end up showing during my gameplay and I can’t have that. Waiting for the call back listener for the ad seems to be the only option so far, even though it isn’t optimal.

You should be able to call ad.hide() to hide the ad.  The other thing you can do is not enable the next button until you show the ad has completed or some time out period has expired.  The ad should support a call back listener that lets you know if the ad displayed or failed in which case you can then react to the situation.

Rob

I call ad.hide() when the scene exits and goes back to the game and it still shows up during the game. I assume for hide to work the interstitial ad has to be already loaded? If so then the hide function wont fix my problem since the ad will still interrupt my gameplay.

If I use a time out period to activate the button the ad may still end up showing during my gameplay and I can’t have that. Waiting for the call back listener for the ad seems to be the only option so far, even though it isn’t optimal.