Re: Dismiss interstitial ads programmatically

3,427 views
Skip to first unread message

Eric Leichtenschlag

unread,
Feb 11, 2013, 2:34:07 PM2/11/13
to google-adm...@googlegroups.com
Hello chenyf,

As a publisher, there is no way to programmatically close the interstitial using AdMob's public API. There might be a way to hack it, but we don't support/recommend it. It wouldn't be fair to the advertiser who is expecting the user to either interact with it or explicitly close it.

On the other hand, if you're using DFP and you are working with the advertiser who is making the creative, there is a way to automatically close the interstitial at the creative level. You can do this via admob.opener.close() from the AdMob API for Ads docs.

Thanks,
Eric


On Fri, Feb 8, 2013 at 1:46 AM, chenyf <chen...@gmail.com> wrote:
Hi, saw someone asked this question before but there was no response.
I am now using Admob SDK 6.2.1 with Android SDK 4.1. How can I close the interstitial ads and back to my main view after a predefined time, for example 5 seconds. And there should have a countdown message showing on the ads.

Thanks.

 

--
 
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
  

Eric Leichtenschlag

unread,
Feb 12, 2013, 7:57:12 PM2/12/13
to google-adm...@googlegroups.com
Hey chenyf,

I'm not completely sure what the creative type is DFP. But it's just some JavaScript snippets used to count down the time, and you could write some JavaScript in your creative to show when it's being closed.

There seems to be an example here on how to close an interstitial after a fixed period. The part about option 1 where you can "call the close method on the ad view when the desired period of time has elapsed" is incorrect, but the creative example can still be used. The code starts the countdown when the interstitital loads, and sets a timer to call admob.opener.close() after [%displayTime%] seconds have passed.

Cheers,
Eric


On Tue, Feb 12, 2013 at 9:17 AM, chenyf <chen...@gmail.com> wrote:
Hi Eric:

I do use DFP to serve the ads to my mobile application on android platform.

If I understand you correctly, I can embed the code to close the ads automatically inside the creative itself without using the Admob SDK. Can I know whether it is using the Third Party creative type? Is there any example? Is it possible to show the number of seconds left to auto close the ads?

Sorry for the questions as I am new to mobile programming and admob. Appreciate for your kind patient.

Chen

Eric Leichtenschlag

unread,
Feb 15, 2013, 6:33:28 PM2/15/13
to google-adm...@googlegroups.com
Yeah, I'm not really sure what #1 is trying to say. It should probably be removed from that doc altogether. You definitely can't add an interstitial to an AdView. They are separate entities.

Thanks,
Eric


On Wed, Feb 13, 2013 at 9:42 PM, chenyf <chen...@gmail.com> wrote:
Hi Eric:

Thank you very much.

The sample provided works for my ads.

For the above mentioned option 1 where you can "call the close method on the ad view when the desired period of time has elapsed", I suppose it meant to other type of ads such as banner ads which can be added into adview? It does not work for interstitial since interstitial ads can't be added into an AdView, if I understand correctly.

Regards
Chen
Reply all
Reply to author
Forward
0 new messages