> For the complete documentation index, see [llms.txt](https://vido.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vido.gitbook.io/docs/ads.md).

# Ads

### Config Adsense <a href="#config-adsense" id="config-adsense"></a>

We use [firebase remote config](https://firebase.google.com/docs/remote-config/) to set ad unit id, \
In this app you must replace this 3 ID with your own data, at file **res/xml/remote\_config\_defaults.xml**\
Data from this file use as default value, anytime you want to change you can change it from firebase remote console.

here how to get ad app id and unit id [**https://support.google.com/admob/answer/7356431?hl=en**](https://support.google.com/admob/answer/7356431?hl=en)

{% code title="remote\_config\_defaults.xml" %}

```markup
<entry>
    <key>ad_app_id</key>
    <value>ca-app-pub-3239677920 . . .</value>
</entry>

<entry>
    <key>banner_ad_unit_id</key>
    <value>ca-app-pub-32396779206 . . .</value>
</entry>

<entry>
    <key>interstitial_ad_unit_id</key>
    <value>ca-app-pub-32396779206 . . .</value>
</entry>
```

{% endcode %}

### Set Remote Config <a href="#disable" id="disable"></a>

Parameter value must add for remote config must be same with value from file **res/xml/remote\_config\_defaults.xml**\
we can see we have 3 parameter for admob need, so you must add it all to remote config.\
\
`1. ad_app_id`\
`2. banner_ad_unit_id`\
`3. interstitial_ad_unit_id`\
\
Here tutorial how to add update remote config <http://blog.dream-space.web.id/?p=220>

### Disable  <a href="#disable" id="disable"></a>

new we make easy way to disable or enable adsense in the app, you only need to set boolean value with TRUE or FALSE

```java
public class AppConfig {

    // flag for enable/disable all ads
	public static final boolean ADS_ENABLE = true;
	
    // flag for display ads (change true & false only )
	. . .
	public static final boolean ADS_MAIN_PAGE = AppConfig.ADS_ENABLE && true;
	public static final boolean ADS_PLAYLIST_DETAIL_PAGE = AppConfig.ADS_ENABLE && true;
	public static final boolean ADS_SEARCH_PAGE = AppConfig.ADS_ENABLE && true;
	
	. . .
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://vido.gitbook.io/docs/ads.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
