iOS AdMob video Interstitial starts playing in background when using preload code from example

830 views
Skip to first unread message

Emir Kalauzovic

unread,
Jan 13, 2015, 11:33:31 AM1/13/15
to google-adm...@googlegroups.com
Hey guys,


We have a function initGADInterstitial that prepares the interstitial as soon as the app is run so its ready in case we need to show it:

    interstitial_ = [[GADInterstitial alloc] init];
    interstitial_.adUnitID = ....;
    interstitial_.delegate = self;
    GADRequest *request = [GADRequest request];
    [interstitial_ loadRequest:request];


But what happens is that if the Interstitial is a video ad even tough we never call [interstitial_ presentFromRootViewController:root]; the sound starts playing in the background from the video in the Interstitial.

Any workaround for this?


Andrew Brogdon (Mobile Ads SDK Team)

unread,
Jan 14, 2015, 7:30:18 PM1/14/15
to google-adm...@googlegroups.com
I've tried replicating the issue with our example and your ad unit, but haven't been able to do so. I do get the same type of ad (portrait view, with a video of an app in the middle and text above and below), but it doesn't start playing until presented.  Downgrading the SDK to 6.9.3 didn't seem to have any effect.

At this point, the likely culprit is a malfunctioning ad, rather than something in the SDK.  These are normally caught and cleaned up, but if it happens again and you can get a proxy log (via something like Charles Proxy) of the request and response, I could probably identify the ad and be of more help.

-Andrew

Emir Kalauzovic

unread,
Mar 19, 2015, 9:11:11 AM3/19/15
to google-adm...@googlegroups.com
Hey Andrew,

After our correspondence over email and you not being able to reproduce the same error this thing continued happening. I've tested in multiple ways and I'm really sure we are not showing it even when all 

GADInterstitialDelegate methods are implemented I can clearly see it receives the Ad (interstitialDidReceiveAd:) and audio starts playing in background somewhere (this time it was Cookie Jam app ad) even tough (interstitialWillPresentScreen:) is never called. 

Andrew Brogdon (Mobile Ads SDK Team)

unread,
Mar 19, 2015, 1:36:55 PM3/19/15
to google-adm...@googlegroups.com
Hmm.  If you're still having the issue, and it can't be replicated with one of our sample projects, my only real option is to ask you for a small, proof-of-concept project that demonstrates the issue, something I can check out myself and then show to one of our engineers. I'm not seeing this issue with anyone else, so there's got to be something in your app's code that either contains a bug or reveals one in our code. 

-Andrew

boofu li

unread,
Apr 17, 2015, 5:01:55 AM4/17/15
to google-adm...@googlegroups.com
hey, I use  SDK 7.0.0.  And I run it on iOS 7.  when i click the video ad, it jump to appstore, then i shutup appstore come back to my app. But i can't close the video ad, i maybe die.
there are some log :
 [23986:60b] attempt to dismiss modal view controller whose view does not currently appear. self = <GADInterstitialViewController: 0x124e34320> modalViewController = <GADBrowserViewController: 0x1289066d0>
[23986:60b] attempt to dismiss modal view controller whose view does not currently appear. self = <RootViewController: 0x124e10de0> modalViewController = <GADInterstitialViewController: 0x124e34320>

David Betts

unread,
Aug 10, 2015, 11:41:10 AM8/10/15
to Google Mobile Ads SDK Developers
I am also seeing this behavior with a Game of War video ad right after my delegate interstitialDidReceiveAd gets called, but only in our Intro workflow when we have AVPlayerLayer playing in the background. It's a tough one to reproduce because it only seems to happen with one ad. I'm trying 

AVPlayerLayer.player.muted = true  to see if that prevents the ad from taking over audio. 

David Betts

unread,
Aug 10, 2015, 11:56:55 AM8/10/15
to Google Mobile Ads SDK Developers
Another issues and likely related. If I am playing background audio on my phone when I launch the app it gets shut off the second I get the call interstitialDidReceiveAd on my delegate. But it doesn't typically start playing the background audio of the ad. 

interstitialDidReceiveAd: Loaded ad for GADMAdapterGoogleAdMobAds

David Betts

unread,
Aug 10, 2015, 12:16:45 PM8/10/15
to Google Mobile Ads SDK Developers
Version:

- Google/AdMob (1.0.7):

    - Google/Core

    - GoogleMobileAds (~> 7.3)

Message has been deleted
Message has been deleted

Vladimir Rackovich

unread,
Apr 13, 2016, 8:37:21 AM4/13/16
to Google Mobile Ads SDK Developers
Did you solve the problem?

Evgeny Rusanov

unread,
Sep 8, 2016, 3:38:19 AM9/8/16
to Google Mobile Ads SDK Developers
Hi. We discovered the same issue in our app.

Is there any suggestions to fix this?

Veer Arjun Busani(Mobile Ads SDK Team)

unread,
Sep 8, 2016, 12:52:04 PM9/8/16
to Google Mobile Ads SDK Developers
Hi Evgeny,

I want to start afresh on this issue here. Can send me the following?
  • A Charles session when this issue happens.
  • Are you able to reproduce this issue locally and with our sample apps? If so, send us the steps to reproduce this.
  • Is there any other playing AudioSource in your app when you are about to present the Interstitial?
  • Can you link your app and tell us where this is occurring?
Thanks,
Arjun Busani
Mobile Ads SDK Team

szdkkk

unread,
Jun 23, 2017, 3:39:04 AM6/23/17
to Google Mobile Ads SDK Developers
Hi, 
    I just met this issue. I'm using the newest SDK(7.21.0) for iOS(objective-c).
    You can easily reproduce this issue with below changes:    

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {


    // Below code causes interstitial autoplays in background if it contains video.


    [[NSUserDefaults standardUserDefaults] registerDefaults:@{@"UserAgent" : @"Mozilla/5.0 (iPhone; CPU iPhone OS 10_0 like Mac OS X) AppleWebKit/602.1.38 (KHTML, like Gecko) Version/10.0 Mobile/14A300 Safari/602.1"}];


    return YES;


}


    Currently I remove the user agent to avoid this issue. Hope you can catch and fix this issue.

Joshua Lagonera (Mobile Ads SDK Team)

unread,
Jun 23, 2017, 4:43:50 AM6/23/17
to Google Mobile Ads SDK Developers
Hi there,

It is not recommended for you to change the User Agent when using the Mobile Ads SDK as it may cause unexpected behavior.

Regards,
Joshua Lagonera
Mobile Ads SDK Team
Reply all
Reply to author
Forward
0 new messages