Custom X button on interstitial

1,437 views
Skip to first unread message

charles-jeremy Colnet

unread,
Jul 6, 2015, 3:14:37 PM7/6/15
to google-adm...@googlegroups.com
Hello (Eric Leichtenschlag) adMob

I have been looking over the forum for a solution to my close X button, here is what I found : 


- You replied to a post in 2013 that the close button ( X ) can't be moved ( except to the upper right side )
Now in 2015, I would like to know if we can move it the the bottom right or bottom left side of an interstitial banner ?

- In 2014 you replied that the X button can't be hidden
 what if we add another ( custom made close button )  to the banner, in that case, can we hide the native X button ?

If we can't move or can't hide the native X button,
 can we customized it in anyway ? replace by a jpg or something ?

Thanks

Vu Chau (MobileAds SDK Team)

unread,
Jul 7, 2015, 10:52:38 AM7/7/15
to google-adm...@googlegroups.com, charlesjer...@quebecor.com
Hi Charles,

It is possible to customize the close button of the interstitial ad.  However, it can't be done at the developer level, as creatives are based on templates.  You can do it as an advertiser by using MRAID when developing the creative.

Vu Chau
MobileAds SDK Team

Charles-Jeremy Colnet

unread,
Jul 7, 2015, 12:28:41 PM7/7/15
to google-adm...@googlegroups.com, Rony Dahomay

Thanks for the info

I found here 
http://www.iab.net/media/file/IAB_MRAID_v2_FINAL.pdf
(page 28)


the “useCustomClose” property


Can you confirm, if I set this property to true, the default X button will disappear and we will only use our home made custom close button ?


( while using MRAID of course )


Thanks




De : google-adm...@googlegroups.com <google-adm...@googlegroups.com> de la part de Vu Chau (MobileAds SDK Team) <mobileadssd...@google.com>
Envoyé : 7 juillet 2015 10:52
À : google-adm...@googlegroups.com; Charles-Jeremy Colnet
Objet : Re: Custom X button on interstitial
 
--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/rADWzZDJNnQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vu Chau (MobileAds SDK Team)

unread,
Jul 7, 2015, 5:09:18 PM7/7/15
to google-adm...@googlegroups.com, charlesjer...@quebecor.com, rony.d...@quebecor.com
Hi Charles,

That is correct.  Setting useCustomClose() to true will disable the interstitial's default close button, and make use of your custom close indicator.

Vu Chau
Mobile Ads SDK Team

On Tuesday, July 7, 2015 at 12:28:41 PM UTC-4, charles-jeremy Colnet wrote:

Thanks for the info

I found here 
http://www.iab.net/media/file/IAB_MRAID_v2_FINAL.pdf
(page 28)


the “useCustomClose” property


Can you confirm, if I set this property to true, the default X button will disappear and we will only use our home made custom close button ?


( while using MRAID of course )


Thanks




Envoyé : 7 juillet 2015 10:52
À : google-admob-ads-sdk@googlegroups.com; Charles-Jeremy Colnet

Objet : Re: Custom X button on interstitial
Hi Charles,

It is possible to customize the close button of the interstitial ad.  However, it can't be done at the developer level, as creatives are based on templates.  You can do it as an advertiser by using MRAID when developing the creative.

Vu Chau
MobileAds SDK Team

On Monday, July 6, 2015 at 3:14:37 PM UTC-4, charles-jeremy Colnet wrote:
Hello (Eric Leichtenschlag) adMob

I have been looking over the forum for a solution to my close X button, here is what I found : 


- You replied to a post in 2013 that the close button ( X ) can't be moved ( except to the upper right side )
Now in 2015, I would like to know if we can move it the the bottom right or bottom left side of an interstitial banner ?

- In 2014 you replied that the X button can't be hidden
 what if we add another ( custom made close button )  to the banner, in that case, can we hide the native X button ?

If we can't move or can't hide the native X button,
 can we customized it in anyway ? replace by a jpg or something ?

Thanks

--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/rADWzZDJNnQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.

Charles-Jeremy Colnet

unread,
Jul 7, 2015, 5:46:05 PM7/7/15
to google-adm...@googlegroups.com

Thanks for your answer,


I am currently using 

mraid.useCustomClose(true);


and sometimes the native x button disappear sometimes it is still there, do I need to add something to permanently fix this ?
In order to remove the x button at all times ?


Thanks


PS : 
here is the code


 if (mraid.getState() === 'loading') {

        mraid.addEventListener('ready', hideClose);

      } else {

       hideClose();

      }

      function hideClose(){

        mraid.useCustomClose(true);       

      }





Envoyé : 7 juillet 2015 17:09
À : google-adm...@googlegroups.com; Charles-Jeremy Colnet
Cc : Rony Dahomay
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.

Vu Chau (MobileAds SDK Team)

unread,
Jul 8, 2015, 2:59:51 PM7/8/15
to google-adm...@googlegroups.com, charlesjer...@quebecor.com
Hi Charles,

Looking at your code snippet, I do not see that you are supplying your own close indicator to suppress the default one.  Could you please confirm if that is the case?  If that does not resolve it, I'd suggest calling useCustomClose() in the default, rather than loading, state.

Vu Chau
Mobile Ads SDK Team

Envoyé : 7 juillet 2015 10:52
À : google-adm...@googlegroups.com; Charles-Jeremy Colnet

Objet : Re: Custom X button on interstitial
Hi Charles,

It is possible to customize the close button of the interstitial ad.  However, it can't be done at the developer level, as creatives are based on templates.  You can do it as an advertiser by using MRAID when developing the creative.

Vu Chau
MobileAds SDK Team

On Monday, July 6, 2015 at 3:14:37 PM UTC-4, charles-jeremy Colnet wrote:
Hello (Eric Leichtenschlag) adMob

I have been looking over the forum for a solution to my close X button, here is what I found : 


- You replied to a post in 2013 that the close button ( X ) can't be moved ( except to the upper right side )
Now in 2015, I would like to know if we can move it the the bottom right or bottom left side of an interstitial banner ?

- In 2014 you replied that the X button can't be hidden
 what if we add another ( custom made close button )  to the banner, in that case, can we hide the native X button ?

If we can't move or can't hide the native X button,
 can we customized it in anyway ? replace by a jpg or something ?

Thanks

--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/rADWzZDJNnQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Charles-Jeremy Colnet

unread,
Jul 9, 2015, 8:51:32 AM7/9/15
to google-adm...@googlegroups.com

Hi Vu

Yes we are supplying a custom close button.

Since yesterday I made few changes to better handle exceptions

here is the code


<script type="text/javascript" src="mraid.js"></script>

<script type="text/javascript">  

    function documentReadyFn()

    {

      if(document.readyState === 'complete') {

        if (typeof mraid !== 'undefined') {

           if (mraid.getState() === 'loading') {

               mraid.addEventListener('ready', hideClose);

           }else if (mraid.getState() === 'default') {

              hideClose();

           }

        }else{

          setTimeout(documentReadyFn,100);

        }

      }else{

        setTimeout(documentReadyFn,100);

      }

    }

    documentReadyFn();


      function hideClose(){       

        mraid.useCustomClose(true);        

      }


      function closeButton(){

         mraid.close();

         //admob.opener.close();

      }

</script>


In theory this should fix the problem.
Also can you confirm that if I have a different ad-unit in the same app, each time the app make the call to display the ad, it will be as if ( the code above ) it's instantiated and running again. Right?

If for example I add a js alert, each time we display an interstitial ad, we should have an alert.
And the code should not interfere with itself, meaning multiple calls to the same function.

Thanks again for your input on this


Envoyé : 8 juillet 2015 14:59

Vu Chau (MobileAds SDK Team)

unread,
Jul 9, 2015, 4:06:55 PM7/9/15
to google-adm...@googlegroups.com, charlesjer...@quebecor.com
Hi Charles,

If you have multiple ad units in the same app, each time a new interstitial is requested, the corresponding HTML will be rendered in the WebView, which means the code will get called again.  Similarly, if you add an alert at the time of the request, you will see the alert for every interstitial.

Cheers,

Vu Chau
Mobile Ads SDK Team

Reply all
Reply to author
Forward
0 new messages