# Ads

Since version 2.0 we move admob config into static value at res/values/strings.xml, this is because new rule from admob library

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="res/values/strings.xml" %}

```markup

<string name="admob_app_id">ca-app-pub-XX</string>
<string name="banner_ad_unit_id">ca-app-pub-XX</string>
<string name="interstitial_ad_unit_id">ca-app-pub-XX</string>
```

{% endcode %}

### 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;
	
	. . .
}
```
