Software Archive
Read-only legacy content

Using admob to add ads- basic question

Sara_I_
초급자
3,556 조회수

 

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 포인트
8 응답
Sara_I_
초급자
3,556 조회수

bump.

0 포인트
PaulF_IntelCorp
3,556 조회수
0 포인트
Sara_I_
초급자
3,556 조회수

bump.

0 포인트
Amrita_C_Intel
3,556 조회수

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

0 포인트
Anusha_M_Intel1
3,556 조회수

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 포인트
Sara_I_
초급자
3,556 조회수

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 포인트
Amrita_C_Intel
3,556 조회수

 

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 포인트
Anusha_M_Intel1
3,556 조회수

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 포인트
응답