# Ad Networks

For monetization purposes, we provide **4 Ad Networks** options with the switch ads method, you can choose the ad network you want to display in the application **AppConfig/Ads**, you can change the ad network anytime you want. The following is a list of ad networks that are supported in this application :

1. Admob
2. FAN
3. Unity Ads
4. Iron Source

You can switch ad network on the go from Firebase Remote Config ( Optional )

### AppConfig.java -> Ads <a href="#config-adsense" id="config-adsense"></a>

From this file you can change default ad network, unit id, interval interstitial, and disable or enable ad.

<figure><img src="/files/tMzFPTxTowrWtnFotHaF" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**IMPORTANT** : All ad network id units are placed in **AppConfig.java** except **admob\_app\_id, applovin\_sdk\_key**, both ids must be integrated programmatically in android code inside **res/value/advertise.xml**
{% endhint %}

<figure><img src="/files/Mdz2wPhHBUIBI2fBDgN0" alt=""><figcaption></figcaption></figure>

{% code title="AppConfig.java" %}

```java
public static class Ads {

   /* enable disable ads */
   public boolean ad_enable = true;

   /* Ad networks selection,
    * Available ad networks ADMOB, FAN, UNITY, IRONSOURCE, APPLOVIN */
   public AdNetworkType ad_network = AdNetworkType.IRONSOURCE;

   public boolean ad_enable_gdpr = true;

   /* disable enable ads each page */
   public boolean ad_main_banner = true;
   public boolean ad_main_interstitial = true;
   public boolean ad_place_details_banner = true;
   public boolean ad_news_details_banner = true;

   /* show interstitial after several action, this value for action counter */
   public int ad_inters_interval = 5;

   /* ad unit for ADMOB */
   public String ad_admob_publisher_id = "pub-3239677920600357";
   public String ad_admob_banner_unit_id = "ca-app-pub-3940256099942544/6300978111";
   public String ad_admob_interstitial_unit_id = "ca-app-pub-3940256099942544/1033173712";

   /* ad unit for FAN */
   public String ad_fan_banner_unit_id = "IMG_16_9_APP_INSTALL#YOUR_PLACEMENT_ID";
   public String ad_fan_interstitial_unit_id = "IMG_16_9_APP_INSTALL#YOUR_PLACEMENT_ID";

   /* ad unit for IRON SOURCE */
   public String ad_ironsource_app_key = "19e977e2d";
   public String ad_ironsource_banner_unit_id = "DefaultBanner";
   public String ad_ironsource_interstitial_unit_id = "DefaultInterstitial";

   /* ad unit for UNITY */
   public String ad_unity_game_id = "4648853";
   public String ad_unity_banner_unit_id = "Banner_Android";
   public String ad_unity_interstitial_unit_id = "Interstitial_Android";

   /* ad unit for APPLOVIN */
   public String ad_applovin_banner_unit_id = "c198b4c9ec05a665";
   public String ad_applovin_interstitial_unit_id = "115962e507d6f6f9";
   
}
```

{% endcode %}


---

# 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://the-city.gitbook.io/docs/7.4/android/ads.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.
