Software Archive
Read-only legacy content

Using admob to add ads- basic question

Sara_I_
Beginner
783 Views

 

I am following steps as on https://udinra.com/blog/admob-ads-intel-xdk-mobile-app

I have done up to step 6.

I am unsure where the code in this step should be posted.  Does it go on the intex.html page?

I'm totally new to this stuff, any help greatly appreciated,


Thanks,
Sara. 

 

0 Kudos
8 Replies
Sara_I_
Beginner
783 Views

bump.

0 Kudos
PaulF_IntelCorp
Employee
783 Views
0 Kudos
Sara_I_
Beginner
783 Views

bump.

0 Kudos
Amrita_C_Intel
Employee
783 Views

Yes! It will go inside index.html file. And for future you can always refer to existing samples. 

0 Kudos
Anusha_M_Intel1
Employee
783 Views

You can either place it within script tags in index.html or specify it in .js files and reference them in index.html. Eg: 

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

There is a sample illustrating Admob use that ships with the XDK. 

Start new project -> Samples and Demos -> General -> HTML5+Cordova -> Hello Admob. 

You can refer to that code for better understanding.

 

0 Kudos
Sara_I_
Beginner
783 Views

Thanks for the reply. and where it says 'your code here' on https://udinra.com/blog/admob-ads-intel-xdk-mobile-app step 6,

what code is that referring to?

E.g, say if I insert a grid , would the code corresponding to this go here or elsewhere?

Many thanks.  

0 Kudos
Amrita_C_Intel
Employee
783 Views

 

It depends when you wish to trigger particular event before or after or at the time of initialization. It is totally your choice. To experiment you can include piece of code at different places to watch the emulation behavior.

0 Kudos
Anusha_M_Intel1
Employee
783 Views

Typically the onDeviceReady() event is fired when Cordova is fully loaded. It signals that Cordova's device APIs have loaded and are ready to access and now you can safely make call to Cordova APIs. 

You can ready more about it here: https://cordova.apache.org/docs/en/4.0.0/cordova_events_events.md.html

0 Kudos
Reply