SD Ads View control

Official Content
This documentation is valid for:

SD Ads View control allows the developers to show Ads (Advertising) on their applications in any place. This control is available in the toolbox and supports several providers. 

SD Ads View control - Toolbox

Considerations

  • For Android generator, you must set Ads Provider property (by default None) at Main object level

Design-time properties

Specific properties associated with this control can be found under Control Info group. 

Ads Provider property

Allows the developer to select the ads provider of the AdsView control. It has three possible values:

  • SmartAdServer
  • MobFox
  • AdMob

SmartAdServer properties group

These properties apply when Ads Provider property has SmartAdServer value.

Property Description
Format Id property  The Format ID in the Smart AdServer manage interface.
Page Id property The Page ID in the Smart AdServer manage interface.
Is Master property The master flag is used by Ad Server to count page views. It must be YES only in one AdsView of your panel.
Target property If you specified targets in the Smart Ad Server manage interface, you can specify it here to target your advertisement.

MobFox properties group

These properties apply when Ads Provider property has MobFox value.

Property Description
Publisher Id property  Each Ads View can refer to a publisher id. The publisher id string is Provider dependent.
User Age property Minimum user age target.
User Gender property  User gender target.
Enter Effect property The effect to be used when a banner is shown inside de Ads View.
Keywords property A list of strings that indicates user's interests.

AdMob group

These properties apply when Ads Provider property has AdMob value.

Property Description
Ad Unit Id property  It is the identifier of the ad that this control will display on the screen. This ad must be a Banner.
Refer to HowTo: Get AdMob Unit Id for advertising in Smart Devices
Native Ads property Enables AdMob native ads. Disable (false) by default.

Run-time properties

AdUnitId

Allows the developer to change the Ad Unit Id design-time property at run-time. Its value must be character-based. Available when Ads Provider property has AdMob value.

image_2018328113413_1_png
 

Methods

RequestAd

It forces the request for a new Ad in a specific time.
Return value  None
Parameters   None
 

Usage example

First, turn on the property Enable Ad on the SD Main object.
Then drag (at least) one SD Ads View control from the toolbox inside the layout of a Panel for Smart Devices object

SD Ads View control - Layout

After that, you must set its properties properly depending on the provider.
In this case, because the provider is AdMob, the identifier of the ad (occasionally more than one and different from each other).

SD Ads View control - Properties

In this case, we also incorporate a fixed ad on the bottom of the screen by setting its properties on the SD Panel.

Finally, run your application and wait until your ads are displayed.

SD Ads View control - Runtime

Note how our controls on the edges of the screen are displayed and there is a fixed advertisement on the bottom.

Notes

  • With the mechanism described here, the developers can include an ad in the place that they want. In the mechanism described in this document, the default behavior is that every panel contains an ad unless Show Ads property is disabled for those panels that the developer does not want to show an ad.
  • The developer can include multiple SD Ads View controls on the same SD Panel. Also, It can include Show Ads and Ads Position properties (at SD Panel level) to display them in a fixed position.

Limitations

Warning: SmartAdServer and MobFox providers (and its properties) are deprecated as of Genexus 15 Upgrade 10.

Warning: Native Ads is deprecated by Google as of March 14, 2018. As of Genexus 15 Upgrade 10, Native Ads property for AdMob provider is no longer available.

Scope

Objects Panel for Smart Devices objectWork With for Smart Devices object 
Platform  Smart Devices (iOS,Android)

Availability

This functionality is available as of GeneXus 15.

 



Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.