Banner
The Banner object is an advertising banner that will be created and automatically added into a specified div in your html.
Minimum requirement is BlackBerry® WebWorks SDK 2.1.
Set access to "blackberry.advertising" and "www.blackberry.com" in the app config.xml
<xml version="1.0" encoding="UTF-8" ?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="2.1" rim:header="RIM-Widget: rim/widget">
<access subdomains="true" uri="http://www.blackberry.com/">
<feature id="blackberry.advertising" required="true" version="1.0.0" />
</access>
<accesss subdomains="true" uri="*" />
</widget>
This API is considered to be in Beta.
The function and property signatures listed below could change at anytime.
Once the API moves out of Beta it will be distributed as part of the core API.
Sign up for the BlackBerry® Advertising Service
Development Guide - Advertising Service for BlackBerry WebWorks
Last Updated: Sun Dec 30 2012 18:15:31 GMT-0500 (EST)
Supported Platform(s)
- BlackBerry OS 6.0+ |
API | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
---|---|---|---|---|---|---|---|
blackberry.advertising.Banner | Y | Y | |||||
bannerTransitions | Y | Y | |||||
focusBorderColor | Y | Y | |||||
focusBorderWidth | Y | Y | |||||
metadata | Y | Y | |||||
mmaSize | Y | Y | |||||
placeholder | Y | Y | |||||
refreshRate | Y | Y |
Configuration Document Settings
To use all of the API described for this object, you must ensure the following settings are in your configuration document: |
You must declare the feature element(s) below in your configuration document: |
Feature ID | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
---|---|---|---|---|---|---|---|
<feature id="blackberry.advertising" /> | Y | Y |
Permission Elements (PlayBook and BlackBerry 10+) |
---|
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
Constructors
Properties
Boolean | bannerTransitions |
String | focusBorderColor |
String | focusBorderWidth |
JSON | metadata |
String | mmaSize |
String | placeholder |
Number | refreshRate |
Constructors
blackberry.advertising.Banner
(zoneId : Number, divId : String, [properties : JSON])
Creates a new Banner Object with the given properties and automatically inserts it into the div with the specified id.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ |
Parameters | |
---|---|
zoneId | The Zone Id given to the developer by the BlackBerry Advertising Service on registration. |
divId | The id attribute of the div tag to which the banner will be inserted. |
properties |
A set of options to further customize the advertising banner.
bannerTransitions: Sets the bannerTransitions property. focusBorderColor: Sets the focusBorderColor property. focusBorderWidth: Sets the focusBorderWidth property. metadata: Sets the metadata property. mmaSize: Sets the mmaSize property. placeholder: Sets the placeholder property. refreshRate: Sets the refreshRate property. |
Code Example:
|
|
Properties
Boolean
bannerTransitions
Determines whether banner transitions will be enabled.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ |
Default Value:
false
String
focusBorderColor
Specifies the focus border colour of the Advertising Banner. Both RGB (ie #667766) and colour names (ie blue) are valid.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ |
Default Value:
'blue'
String
focusBorderWidth
Sets the border width of the banner when focused.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ |
Default Value:
'2px'
JSON
metadata
Specify the metadata (key/value pairs) for more targeted Advertisement.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ |
String
mmaSize
Specify the size of the banner. Should be one of;
- "small"
- "medium"
- "large"
- "extralarge"
- "extraextralarge"
- "auto"
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ |
Default Value:
"auto"