Unofficial Content

In GeneXus, when the Ads (Advertising) are enabled and the selected provider is AdMob, you must fill the AdMob Application ID (Android) or the AdMob Application ID (iOS) properties of the Ads View control.

This article explains how to get the identifier for these properties step to step.

Step 1: Register in AdMob

Sign up on the AdMob website site to be a publisher.

Step 2 - Monetize your app

Go to the "Apps" tab, and click on the "ADD YOUR FIRST APP" button.

Add app with admob - Native Mobile - Android

This will redirect you to another page to instantiate a new app.

Step 3 - Create an advertisement

Once in the new page, select "Andorid" as a platform and select "No" if you don´t have your application listed on an app store or select "Yes" if you do. In this sample, the "No" option was selected.

Define the platform in admob - Android app

Click on the "CONTINUE" button. Next, complete with the following steps:

  1. Enter an "App" name. and click on the "ADD APP" button.

    Add App name admob - android

  2. The following message will be shown:
    Message after adding app in admob

  3. Click on the "DONE" button. A new page will be opened. Click on the "ADD AD UNIT" button to add the ad Unit.
    Add ad unit admob

  4. Select the ad format you want. In this case, "Banner" was selected.

  5. A new window will be shown where you have to configure the Ad unit settings. Enter the ad unit name and select the "Create ad unit" button.
    Add format preferences admob

  6. Finally, the AdMob site will allow you to download some tools (there are not necessary) and it will show you a summary of the previous steps.
    Click on the "DONE" button.
    Add Unit Sucessfully created in admob

Step 4 - Get the AdMob Unit Id

Once you've done the previous steps, on the left side you can see all your apps with ads.
Select the app that you have configured before, and it will show you all the ads associated with it.

By simply copying the Ad unit ID number to GeneXus's AdMob Application ID (Android) property,  your Android app automatically will have ads on it. If you are working with an iOS application you have to complete the AdMob Application ID (iOS) property

Ad unit obtain in admob

Sample Units

Creating ads must be validated by Google. AdMob offers Sample Ads Units for each platform which can be used for testing purposes instantaneously. 

See also

Ads (Advertising)
Ads View control

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant