AdMob Plugin

Integrate with AdMob to monetize and promote your apps & games with ads on Android and iOS.


Once you have included V-Play AdMob Plugin you can display ad banners and interstitials from Google advertisers in your apps & games. You then get paid every time your users click on ads in your app.


Combine the AdMob Plugin with other plugins like in-app purchases to up-sell users from ad-supported apps to ad-free versions.


The plugin supports all ad types provided by the Google Mobile Ads SDK. In order to use the AdMob plugin, a new AdMob account is required. If you do not have an AdMob account yet, you can create a new one at or connect AdMob with your Google Account.

Always make sure that your usage of AdMob complies to AdMob's Terms of Service. When you place ads in your apps, always think about the user. You do not want to drive your users away by overwhelming them with ads. Therefore, it is important to find the right balance. Google created a list of AdMob dos and don'ts which is recommended to read before starting off with AdMob.

Use Cases

Ad Banners

Ad banners can be used to display ads within your app without distracting your user from the app's main functionality. If you just want to include simple banner ads into your apps, Smart Banners are probably the right thing for you. They are versatile, support all device types and sizes and are really easy to use, see Example Usage for a simple example.

AdMob also offers a range of different-sized banners, which you can incorporate into your apps and games. Please note that some of the available sizes can only be used on tablets due to their dimensions.

Banners get only loaded if the QML item is visible, meaning that it's visible property is not set to false and all its parent items are visible too.

For more information about ad banners have a look at AdMobBanner item.


Interstitials are full-screen ads with interactive content that can be presented to the user e.g. when a level of a game was completed. Since they do not take away precious screen space while the game is running, they are perfectly suitable for games.

For more information about interstitials have a look at AdMobInterstitial item.

Example Usage

To try the AdMob plugin or see an integration example have a look at the V-Play Plugin Demo app.

Please also have a look at our plugin example project on GitHub:

The AdMobBanner item can be used like any other QML item. Here is a simple example of how to add a SmartBanner at the top of your app with the help of anchoring:

 import VPlayPlugins 1.0

 AdMobBanner {
   adUnitId: "<your-adunit-id>"
   testDeviceIds: [ "<a testdevice id>" ]
   banner: AdMobBanner.Smart

   anchors.horizontalCenter: parent.horizontalCenter

To load and open an interstitial ad you can use the following code snippet:

 import VPlayPlugins 1.0

 AdMobInterstitial {
   adUnitId: "<your-adunit-id>"
   testDeviceIds: [ "<your-test-device-id>" ]

   onInterstitialReceived: {

Note: If possible, add your devices' device id to AdMobBanner::testDeviceIds or AdMobInterstitial::testDeviceIds during testing your app.

Available QML Items


AdMob item allows monetizing your app by embedding AdMob ads on Android and iOS


AdMob item allows monetizing your app by embedding AdMob ads on Android and iOS


To use the AdMob plugin you need to add the platform-specific native libraries to your project, described here:

iOS Integration Steps

  1. Download our PluginDemo from and unzip it.
  2. Copy GoogleMobileAds.framework from the ios subfolder to a sub-folder called ios within your project directory.
  3. Add the following lines of code to your .pro file:
     ios {
       VPLAY_PLUGINS += admob
  4. Add the following entry to your Project-Info.plist file in the ios subfolder of your project:

    This ensures that the delivery of ads is not affected by the App Transport Security feature introduced with iOS 9, as described here.

Android Integration Steps

  1. Open your build.gradle file and add the following lines to the dependencies block:
     dependencies {
       compile 'net.vplay.plugins:plugin-admob:2.+'

    Note: If you did not create your project from any of our latest wizards, make sure that your project uses the Gradle Build System like described here.

Used AdMob SDK Versions

iOS Google Mobile Ads SDK 7.16.0
Android Google Play Services 10.0.1

Note: Other SDK versions higher than the stated ones might also be working but are not actively tested as of now.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support