google-admob-plugin
Mobile icon

Google AdMob Plugin

Stable version 3.0.1 (Compatible with OutSystems 11)
Other versions available for 10
Uploaded
 on 04 July 2022
 by 
4.8
 (6 ratings)
google-admob-plugin

Google AdMob Plugin

Documentation
3.0.0

Getting Started

Installation

Go to the AdMob portal and add your app (if you haven't done so already).

So you have the Application ID, clone the plugin module and give it a new name. On the cloned module go to the Extensibility Configurations and change the value of APP_ID_ANDROID and APP_ID_IOS with your app ids. Do not change anything else.
You can now publish and reference your module.

Initialize AdMob SDK

The plugin does not initialize AdMob SDK automatically. This allows requesting user consent before contacting any AdMob services.

Therefore, AdMobStart must be called before loading ads.

Note that admob is undefined until deviceready event is fired.


Create Ad Unit

Go to the AdMob portal and create a new ad unit for your app.

So you have the Ad Unit ID for later showing the ad.

Display Ads

Following the guide of different supported ad types to display ads,

  • Banner Ad
  • Interstitial Ad
  • Rewarded Ad
  • Rewarded Interstitial Ad


You can call each Set action (SetBannerAd, SetInterstitialAd,...) and ca-app-pub-xxx/yyy should be replaced with your Ad Unit ID, pass in extra parameters as required.
After setting up your ad, you can call the Load action, then you should wait for the load event (each banner type have their own event), on successful load you can call the Show action and your ad should appear.


⚠️You should check the included demo app, as it shows how can you call and show your ads.


Version 3.0.1 API: