Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
zgames
Posts: 7
Registered: ‎08-31-2013
Accepted Solution

ad banner in HTML/Javascript

Hi,

I am developing my app using Phonegap in Eclipse(with Blackberry Plugin) in language HTML and Javascript.

This is a free app and I want to integrate the Ad banner.

Do have any method to integrate the AdMob with HTML for Blackberry?

or can anybody help me how to integrate the ad banner for blackberry?

Thanks

 

Please use plain text.
Developer
matizeitune
Posts: 366
Registered: ‎07-15-2013
My Carrier: Personal

Re: ad banner in HTML/Javascript

Please use plain text.
New Contributor
zgames
Posts: 7
Registered: ‎08-31-2013

Re: ad banner in HTML/Javascript

Hi Matizeitune,

Thanks for the reply.

I used the method you mentions but ad is not showing:

 

Below the steps I follows:

 

1 - Added the below code in index.html

 <script type="text/javascript" src="http://www.blackberry.com/app_includes/asdk/adBanner.js"></script>

and

<script type="text/javascript" charset="utf-8">

var banner1 = new blackberry.advertising.Banner(31848, "bannerDiv");

</script>  

.............

<td colspan="3" style="background-color:White">s
<div id="bannerDiv" style="height:55px"> </div>
</td>

 

2-Added below xml data in config.xml

<access subdomains="true" uri="http://www.blackberry.com/"> 
      <feature id="blackberry.advertising" required="true" version="1.0.0" /> 
   </access> 
   <accesss subdomains="true" uri="*" /> 

 

Note : The above code is inside the below widget (since there is only one widget that is for cordova)

So the content of config.xml is as follows(I am using eclipse with Phonegap for development):

 

<widget xmlns = "http://www.w3.org/ns/widgets"
id = "io.cordova.helloCordova"
version = "2.0.0">

 

..... ...(other code)

......

<access origin="*"/>

<access
subdomains="true"
uri="http://www.blackberry.com/" >
<feature
id="blackberry.advertising"
required="true"
version="1.0.0" />
</access>
<accesss subdomains="true" uri="*" />

<!-- <content src="http://mysite.com/myapp.html" /> for external pages -->
<content src="index.html" />

 

...

...(other code)

 

</widget>

 

But the ad is not displying.

Please help me

 

Please use plain text.
Developer
matizeitune
Posts: 366
Registered: ‎07-15-2013
My Carrier: Personal

Re: ad banner in HTML/Javascript

I dont know whats happening here , I am dont know much of phonegap.

With bbui this can be easier than this, beacuse you have a lot of properys  how this,

<div data-bb-type="panel-header"> Hello </ div> , this is the title header.

But I dont know wich kind of banner are you want

If you find this information useful please click like --->
@mezeitune on twitter
Please use plain text.