Interstitial with video has a delay calling "onAdClosed"

368 views
Skip to first unread message

Marta Rodriguez

unread,
Jan 11, 2018, 4:07:36 AM1/11/18
to Google Mobile Ads SDK Developers
Hi,

I have implemented interstitial ads in my apps for a long time, but now I have noticed strange behavior when I receive interstitial with video content.

When I receive interstitial with video and I click close button or back button it takes about 2-3 seconds to "onCloseAd" function being called. With this behavior the same screen is shown for a few seconds after de interstitial close, and this violates the Admob policies.
With text and image interstitial this doesn't happen.

Here a code snippet:
public void initInterstitial() {interstitial = new InterstitialAd(this);
interstitial.setAdUnitId("");

// Create ad request.
AdRequest adRequest = new AdRequest.Builder()
 .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
 .build();

// Begin loading your interstitial.
interstitial.loadAd(adRequest);

interstitial.setAdListener(new AdListener() {
 @Override
 public void onAdClosed() {
 super.onAdClosed();
 showNextScreen();
 }

 @Override
 public void onAdFailedToLoad(int errorCode) {
 super.onAdFailedToLoad(errorCode);
 //Try again
 initInterstitial();
 }
});
}

private void showInterstitial () {
    if(interstitial.isLoaded()) {
        interstitial.show();
    } else {
        showNextScreen();
    }
}




App Info:
Google Play Services = 11.8.0
Android target SKD version = 26

Android device info:
Nexus 6P
Android 8.1.0
Google Play Services: 11.9.51

Thanks,
Marta

mobileadssdk-a...@google.com

unread,
Jan 11, 2018, 1:04:10 PM1/11/18
to Marta Rodriguez, Google Mobile Ads SDK Developers
Hello Marta, 

Thank you for sharing the code snippets. Could you provide us a screen recording of the issue along with the complete device logs, logging the Ad events and the Ad Unit ID used, so I can take a look? Also, could you please confirm if you're able to reproduce the issue by testing your Ad Unit ID, with our sample apps? If you could provide these details, it will help us debug the issue. Please use Reply privately to author option to provide the requested details. 

Regards,
Bharani, Mobile Ads SDK Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Reply all
Reply to author
Forward
0 new messages