Software Archive
Read-only legacy content
17061 Discussions

Hello Admob create banner on load

Miles_S_
Beginner
268 Views

Hi 

 

I'm trying use the Hello Admob demo to create a base too add my already finished application into. However I'm having some issues. 

I can't get the banner ad to be created on load. I tried putting

 

<body onload="createbanner()"> But that just made all of the buttons not work. The video on the XDK Channel is now out of date so no help there.  Is there a way to just get the banner to load at the bottom when the app loads automatically. Then i can just paste in my banner codes and be ready to go.

 

Thanks

0 Kudos
1 Reply
Rakshith_K_Intel
Employee
268 Views

Try adding after the "deviceready" event is fired:

<script>
document.addEventListener("deviceready", function(){
    createbanner();
}, false);  
</script>

 

0 Kudos
Reply