# Admob Configuration

## Introduction

[AdMob](https://developers.google.com/admob/) is a multi platform mobile ad network that allows you to monetize your android app. By integrating AdMob you can start earning right away. It is very useful particularly when you are publishing a free app and want to earn some money from it.

&#x20;Integrating AdMob is such an easy task that it takes not more than 5mins. In this article we’ll build a simple app with two screen to show the different types of ads that AdMob supports.

### Creating Ad Units

{% hint style="info" %}
NOTE : AdMob admin interface changes quite often. The below steps to create Ad Unit IDs might differ time to time.
{% endhint %}

Want to know more?? Follow this link - <https://developers.google.com/admob/android/quick-start>​

**1**. Sign into your [AdMob](https://apps.admob.com/) account.

**2**. Create a new App by giving the **package name** of the app you want to integrate AdMob. Once the App is created, you can find the **APP ID** on the dashboard which looks like **ca-app-pub-XXXXXXXXX\~XXXXXXXXX**.

**3**. Select the newly created App and click on **ADD AD UNIT** button to create a new ad unit.

**4**. Select the **ad format** and give the ad unit a name.

**5**. Once the ad unit is created, you can notice the **Ad unit ID** on the dashboard. An example of ad unit id look like **ca-app-pub-066XXXXXXX/XXXXXXXXXXX**

![Create ad unit for banner ads](/files/-LCJJVbPIFJlEb0rd3pF)

After creating banner ad unit and interstitial ad unit you have to place you adUnit id in string.xml file.

**app > res > values > string.xml**

![string.xml](/files/-LG_3ATOPr3xYc2f3OXb)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://itechnotion.gitbook.io/all-in-one-social-apps/admob-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
