Banner
Última actualización
Última actualización
Banner ads are rectangular image or text ads that occupy a space inside the application layout. They stay on screen while the users interact with the app and can automatically refresh after a certain period of time. If you are new in mobile advertising, they are an excellent choice to start.
Banners are integrated by adding the WortiseBanner
widget to the app's layout. Below, you can find a simple integration example:
The widget has support for the following parameters:
Adaptive banners are a new banner format where the size of the ads is adapted according to the device and the app user-interface, in order to maximize performance.
Currently there is support for two kind of adaptive banners:
This kind of banner is designed to replace the traditional 320x50 banners and be positioned at the top or bottom of the screen.
To make use of this format, an AdSize
generated in the following way must be passed to the BannerAd
widget:
This other kind of banner, in comparison to the anchored, is designed to have a variable height and be positioned inside a scrolling content.
In this case, an AdSize
must be generated this way:
Parameter
Type
Required
Descripction
adUnitId
String
Yes
The ad unit ID to assign to the banner
adSize
String
No
Maximum size (height) for the banner. The possible values for this parameter are declared in the RNWortiseAdSize
object
autoRefreshTime
Integer
No
Value in seconds that represents the time that must elapse to load a new banner ad
onClicked
Function
No
Function that will be invoked when the banner has been clicked
onFailedToLoad
Function
No
Function that will be invoked when the banner could not load an ad
onImpression
Function
No
Function that will be invoked when the banner has generated an impression
onLoaded
Function
No
Function that will be invoked when the banner has loaded an ad
onSizeChange
Function
No
Function that will be invoked when the banner size has changed