Implementing banner and interstitial ads in ios newbie question

35 views
Skip to first unread message

resting

unread,
Aug 25, 2014, 2:41:23 PM8/25/14
to google-adm...@googlegroups.com

Hi,

I’m trying to implement banner and interstitial ads into my app.

I’m new to admob and implementing ads, so I have some very simple question.

For interstitial ads, do I have to have a timer to keep sending a new request to load it, assuming I want it to pop up every few seconds?

So since I’m testing, I’m using the same request for both the banner and interstitial ads like so.

GADRequest *request = [GADRequest request];
request.testDevices = @[ GAD_SIMULATOR_ID ];

Is it fine to use the same request for both the banner and interstitial ads, or do I need to create another request object?

For production, all I have to do is remove the request.testDevices = @[ GAD_SIMULATOR_ID ]; and I’m good to go?

Thanks

Eric Leichtenschlag

unread,
Aug 25, 2014, 9:03:46 PM8/25/14
to google-adm...@googlegroups.com
Hello and welcome to the Google Mobile Ads SDK forum.

Interstitial ads don't automatically reload and require that you make each request explicitly. To maintain a good user experience though, you wouldn't want to show an interstitial every few seconds. The common use case is to preload an interstitial, wait until a good stopping point to show it, and then listen for the interstitialDidDismissScreen callback in GADInterstitialDelegate to preload another interstitial, and wait for the next stopping poitn.

I haven't ever tried passing the same request object to banners and interstitials. I assume it'll work, although GADRequest objects are pretty cheap to make. You could also break out request generation into its own function.

For production, feel free to remove the request.testDevices line, but you don't need to. That property is set up so only specific devices (like simulators in the case above) get test ads, while all other devices get live ads. So even if you release with that code, all devices will still get live ads.

Cheers,
Eric
Reply all
Reply to author
Forward
0 new messages