# AdMobInterstitial

In this tutorial, we'll show you how to easily monetize your apps using **AdMobInterstitial** component. This component can be used to create AdMob full screen ADs

## Assumption:

You have already created an AdMob AdUnitId. If you haven't, please follow Steps 1-6 from source [HERE](https://quickappninja.zendesk.com/hc/en-us/articles/115000826865-How-to-create-Banner-Admob-Ad-unit-ID-?mobile_site=true).

## Ad Guidance:

Please see AdMob video guide below. It is very important to follow their Terms of Service (ToS) and guide:

<https://support.google.com/admob/answer/6128877?hl=en>

## Setup:

Create a new AppyBuilder project and name it TestAdmobFullScreen

From Monetize category, drag-and-drop AdMobInterstitial onto layout screen

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-L9BuJyLkdYbNvBFGfWc%2F-L9Bua7nwEIvxg9QAVoi%2Fbook-admob-1.png?generation=1522782598427219\&alt=media)

Select this component and for its designer AdUnitId, enter your AdUnitId.&#x20;

***NOTE: For testing, you should use TEST AdUnitId. See link***&#x20;

[***HERE*** ](https://developers.google.com/admob/android/test-ads)

***for these IDs.***&#x20;

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-L9BuJyLkdYbNvBFGfWc%2F-L9Bua7pOZ8TOImk9owH%2FbookAdMob1.png?generation=1522782598578874\&alt=media)

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-L9BuJyLkdYbNvBFGfWc%2F-L9Bua7yYxzMie8XlZpp%2Fbook-admob-2.png?generation=1522782596691596\&alt=media)

Next, Select Screen1 and set the Screen1 **Sizing** to **Responsive**:

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-L9BuJyLkdYbNvBFGfWc%2F-L9Bua8MJQqSFi7UA4Q3%2Fbook-admob-responsive.png?generation=1522782597372758\&alt=media)

This component has blocks / events that are shown in image blow. **LoadAd** block is executed automatically on startup. If Ad is successfully loaded, the **AdLoaded** event will be triggered. DO NOT use LoadAd block in this event because it will create an infinite loop. If the Ad fails to load, then **AdFailedToLoad** will be triggered and you can check the Error or message parameters to inspect why Ad was not served

**ShowInterstatialAd** block can be used to display the AD that was last loaded.

**AdClosed** block, gets triggered when AD is closed. In this block, you can use LoadAd block to load the next ad and prepare for next AD display.

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-L9BuJyLkdYbNvBFGfWc%2F-L9Bua8uHZfPA-GQo5h6%2Fbook-admob-3.png?generation=1522782598502264\&alt=media)

The AD can be displayed when changing screens or when user clicks a button. DO NOT encourage user to click in order to display the AD. Please follow Ad Guidance shown above.

### From [iNetAjmer](http://community.appybuilder.com/u/inetajmer) AppyBuilder Member

You can also check the error message that may give some idea about the issue:

![](https://3777451846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L93-jOwVwLojc0B0kcn%2F-L9BuJyLkdYbNvBFGfWc%2F-L9Bua927QVohe2LPxKH%2FAdMobBlocksErrorChecking.png?generation=1522782597952614\&alt=media)
