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
Developer
Posts: 27
Registered: ‎02-22-2010
My Device: Password

WebWorks ads Banners empty / blank

Hello,

 

I created a Blackberry Ads account, followed the instructions. When I implement it in my webworks app, everything seems fine other than I get a white rectangle with no content. I thought it was my app that was creating the prob so I created a blank html page, dumped the example code with my zone id and it is still blank. 

 

Here's my test code: 

 

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1"> 
        <title>TEST</title>
        <script type="text/javascript" src="http://www.blackberry.com/app_includes/asdk/adBanner.js"></script>
    </head>
    <body>
       <center> <div id='bannerDiv'>     </div> </center>

<script type="text/javascript">
  //Adding Banner with default Banner properties
 var banner1 = new blackberry.advertising.Banner(my_zone_id_here, "bannerDiv");   
</script>
    </body>
</html>

 Does anyone have encounter this before? I'm sure i'm not the first one to try to implement this interface. Thanks

Developer
Posts: 135
Registered: ‎09-25-2012
My Device: Dev Alpha
My Carrier: Rogers

Re: WebWorks ads Banners empty / blank

Is this for BB10? I don't think there is Ad Services available for WebWorks. 

Developer
Posts: 27
Registered: ‎02-22-2010
My Device: Password

Re: WebWorks ads Banners empty / blank

I followed the instructions in the API: 

 

http://developer.blackberry.com/html5/apis/blackberry.advertising.banner.html

 

It falls under BB10. So I think it whould be available under BB10 

 

I discovered some ripple errors as I was looking for an anwser. I will post the solution when I find it. Otherwise, I invte people to post their suggestion :smileyhappy: 

Retired
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: WebWorks ads Banners empty / blank

Ads are not yet supported in WebWorks BB10 :smileysad:. The link you submitted is under BBOS. Support will most likely come in the future.

 

I'm not sure if anyone else has a third party API?

@erikjohnzon
erjohnson@blackberry.com
Developer
Posts: 27
Registered: ‎02-22-2010
My Device: Password

Re: WebWorks ads Banners empty / blank

Thanks Erik,

 

Not to sound too condescending with this but the link points out the BOX under BB10 in the left menu. However, that would also explain why only the demo zone id works and not the one I registered. 

 

I'm stating to find that developing for BB10 is not worth doing at the moment. I can't get the blackberry.identity.uuid to work, I can't get the ads to work... and half of the example won't work correctly on BB10 Gold because someone decided to remove <access uri="*">!

 

This is getting fustrating. :smileyfrustrated:

 

Do you think it would be possible to get a full list of what API actually works as of release 10.0.10.85 and what doesn't?

 

Thanks

Alex

Retired
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: WebWorks ads Banners empty / blank

[ Edited ]

Hey Alex,

 

Hmm, not sure I agree. When I click on BB10 this is the listing of supported API's I get: http://developer.blackberry.com/html5/apis/bb10_index.html Now, with this I would agree that perhaps a more clearly defined set would be nice; this is the devil of switching to a new platform.

 

I'm not sure I understand your comment on access uri="*" being removed. We have most certainly not removed it. We did do some updating to our whitelisting logic; but this was to remain consistent with the WebKit logic. If you have a specific gripe feel free to pester me, I'll do my best to help out.

 

As far as a full list of APIs that work on BB10. We don't release API's to the docs unless we have tested them. So this list should serve as the one you desire: http://developer.blackberry.com/html5/apis/bb10_index.html

 

If you are having problems withthe identitiy API let me know. Here are the docs for it, which you can see is supported across BBOS5 thru 10: http://developer.blackberry.com/html5/apis/blackberry.identity.html

 

-Erik

 

@erikjohnzon
erjohnson@blackberry.com
Developer
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

Re: WebWorks ads Banners empty / blank

@Erk since SDK 1.0.4.5 uri="*" stopped working. After the update you had to white list each domain. Apparently you can use the following now....

<feature id="blackberry.app" >
<param name="websecurity" value="disable" />
</feature>

I can confirm because I had a few apps that stopped working after the update and had a hell of a time figuring out why.
_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Retired
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: WebWorks ads Banners empty / blank

Hey Phillipk,

 

I can't confirm what SDK version, but what happened is we turned web security ON when it was previously off. The good news is that means that you can expect the same security model as the browser.

 

The bad news with it was that we had to explicitly whitelist our cross-site XHR requests so that you could still get away with them.

 

If you explicitly whitelist the domains that you make cross-site XHR requests too it will work fine. However if you would like to turn off all web security (which I would not advise unless you must) you can do so.



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Contributor
Posts: 17
Registered: ‎03-06-2013
My Device: Playbook
My Carrier: Fido

Re: WebWorks ads Banners empty / blank

I have also tried it, I don't get any error in simulator but get this in the web inspector

"error in webworks Ad iframe loggingReferenceError: Can't find variable: blackberry.."

Any idea what's this?

Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: WebWorks ads Banners empty / blank

A word of caution regarding blackberry.identity.uuid.
If I'm not mistaken, this won't give you a true version 4 UUID, but will return the user's PIN. Could be useful to know if you're building cross-platform.
--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.