|
|
|
|
|
- Overview of Ad control
- Creating an Ad control
- To create an Ad control:
- Size of ads
- Operating mode of Ad controls
- Test mode
- Loading and refreshing the ads
- Click on an ad
- Modifying the permissions
The Ad control is used to monetize an Android application by displaying an ad banner. This banner will generate incomes according to the number of clicks performed by the application users. The "AdMob" protocol (Google) is used to display the ads. To create an Ad control: - On the "Creation" tab, in the "Graphic controls" group, click "Ad".
- Click at the desired location to create the control.
To view the control characteristics, select "Description" in the context menu of the control. Size of ads The context menu found on the right of the icon for control creation proposes four possible sizes: - 320 x 50, for the phones and tablets.
- 300 x 250, for the tablets only.
- 468 x 60, for the tablets only.
- 768 x 90, for the tablets only.
Caution: - The selected size will be the minimum control size. The control can be enlarged in edit or at runtime. In this case, the banner will remain centered in the control.
- No ad will be display if the size of the Ad control is not sufficient.
Operating mode of Ad controls Test mode AdMob does not allow application providers to click their own ads or increase the number of ads displayed. The test mode of Ad control is used to display "fake ads" on which the click triggers no income. The test mode is automatically: - enabled when the application is started on the emulator.
- disabled at runtime on the phone or on the tablet.
Remarks: - At runtime in the simulator, the Ad control will display a fixed image whose size is identical to the size of the ad banner.
- The TestMode property determines if the test mode is enabled or disabled.
Loading and refreshing the ads An ad is automatically loaded in the Ad control when the window is opened. Then, new ads can be regularly loaded in the control according to the refresh rate defined in the application setting on the AdMob site. The ads are loaded in background task from Internet. Therefore, the device must be connected in order for the ads to be displayed. A timeout (few seconds to several minutes) may be required between the opening of the window and the actual display of the first ad. This timeout depends on the connection quality and on the ad size. We recommend that you use the events "Loading an ad" and "Error while loading an ad" to check the display of ads in the control. For more details, see Ad control events. Remark: It is possible to know if an ad is displayed in the field thanks to the AdLoaded property. Click on an ad The consequences of a click performed on an ad displayed in the Ad control depend on the type of ad. The most common actions are: - Opening the market to download the application corresponding to the ad.
- Opening the browser on the site corresponding to the ad.
Modifying the permissions Using an Ad control automatically adds the following permissions to the list of permissions required by the application: - INTERNET
- ACCES_NETWORK_STATE
- AD_ID
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|