Shows Ads (Advertising) on your applications in any place. This control is available in the Toolbox and supports several providers.
For Android generator, you must set the Ads Provider property(GeneXus 16 upgrade 10 and lower) at the Main object level.
Specific properties associated with this control can be found under the Control Info group.
These properties apply when Ads Provider property has AdMob value.
These properties apply when Ads Provider property has GoogleMobileAds value.
Changes the Ad Unit Id design-time property at run-time. Its value must be character-based. Available when Ads Provider property has AdMob value.
It forces the request for a new Ad in a specific time.
Return value None
First, turn on the property Enable Ad on the SD Main object.
Then drag (at least) one Ads View control from the toolbox inside the layout of a Panel object.
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).
In this case, include also a fixed ad on the bottom of the screen. You can do it by setting its properties on the Panel.
Finally, run your application and wait until your ads are displayed.
Note how our controls on the edges of the screen are displayed and there is a fixed advertisement on the bottom.
- With the mechanism described here, you can include an ad in the place that you want. In the mechanism described in the Ads (Advertising) article, the default behavior is that every Panel contains an ad unless Show Ads property is disabled for those Panels that you don't want to show an ad.
- You can include multiple Ads View controls on the same Panel. Also, it can include Show Ads and Ads Position properties (at the Panel level) to display them in a fixed position.
GoogleMobileAds is available as of GeneXus 16 upgrade 7 for the Android Platform.