Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!


The AdMobRewardedVideo item allows monetizing your app with banner ads on Android and iOS. More...

Import Statement: import Felgo 3.0




Detailed Description

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.

 import Felgo 3.0

 App {
   NavigationStack {
     Page {
       title: "Admob Banner"

       AdMobBanner {
         adUnitId: "ca-app-pub-3940256099942544/6300978111" // banner test ad by AdMob
         testDeviceIds: [ "<a testdevice id>" ]
         banner: AdMobBanner.Smart

         anchors.horizontalCenter: parent.horizontalCenter

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 its visible property is not set to false and all its parent items are visible too.

If AdMobBanner.Smart is set as banner type the banner will automatically resize to the full width on screen orientation changes.

The actual ad view is displayed as a view native to the platform, which always makes it appear on top of all other QML items, disregarding the z property. If you want to display another QML item above the ad at some point, make sure to set the ad's visible property to false, otherwise it would still be hidden behind the ad view. If your app may move the ad item outside of the visible bounds of a container view, like when it scrolls inside a ListView or Flickable, consider using AdMobNative and its clipContainer property instead.

For more information also have a look at AdMob Plugin.

Property Documentation

adUnitId : string

Provide your Ad unit ID retrieved from the AdMob console in the format ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx here. If you do not have an AdMob account yet, you can create a new one at Once you are logged in, you can acquire a new Ad unit ID by creating a new app and defining a new ad unit.

banner : enumeration

This enum type defines what kind of banner should be displayed.

  • AdMobBanner.Standard - A standard banner of size 320 x 50
  • AdMobBanner.Large - A large banner of size 320x100
  • AdMobBanner.Medium - A medium rectangle banner of size 300x250
  • AdMobBanner.LeaderBoard - A leaderboard-sized banner of size 728x90
  • AdMobBanner.Smart - A auto-resizing smart banner (recommended)

The default banner is AdMobBanner.Smart.

Note: Please keep in mind that some banners might be too large for displaying on some devices and therefore won't be displayed. It's recommended to use the AdMobBanner.Smart banner size for apps targeted for multiple device types.

childDirectedTreatment : bool

Set this property to true if you want to indicate that you want Google to treat your content as child-directed. Google will then take steps to disable IBA and remarketing ads for your ads.

More information can also be found here.

designedForFamilies : bool

Set this property to true if you have opted your app in to Google Play's Designed for Families program.

Note: This property is only applicable for Android. You need to ensure ads comply with the Designed for Families program requirements and ad policies.

More information can also be found here.

testDeviceIds : list<string>

Provide your device id as an array of string values here to receive test ads for the specific test devices.

Note: If you test your application with live ads frequently, Google might ban your account for fraud. Therefore if you are not able to provide the testDeviceIds and test with live ads instead, make sure not display the AdMob item everytime you test your app on your device.

You can find your testDeviceIds in the device log after you first run an your app with integrated AdMob plugin, search for "To get test ads on this device, call adRequest.addTestDevice".

Signal Documentation


This handler is called when the application was moved to background to display an ad e.g. in the browser and the user returns from the browser.


This handler is called either because of a network error or when an ad should be displayed, but AdMob can't find an ad that fits your application. A possible reason for this can be the filter settings in your AdMob account, or that AdMob does not have any related ads in your country.


This handler is called when a banner is clicked and the application will be moved to the background to display the ad.

See also AdMobBanner::adOpened.


This handler is called when a banner is clicked and e.g. a new browser window will be opened by the ad soon.

See also AdMobBanner::adLeftApplication.


This handler is called as soon as the requested ad is loaded and displayed on the screen.