---
description: Disable ad networks at runtime
---

# Disabling Ad Networks

{% hint style="info" %}
Disabling ad networks at compile time using [Maven](../../start/setup/maven#add-or-remove-a-d-network-sdks) will always override runtime settings (since the ad network’s SDK won’t be present physically).
{% endhint %}

### Disable Ad Network <a href="#disable-ad-network" id="disable-ad-network"></a>

To disable ad networks at runtime, call the following method passing the [AdNetwork](https://android-sdk.aatkit.com/references/-a-a-t-kit/com.intentsoftware.addapptr/-ad-network/index.html) to disable:

{% tabs %}
{% tab title="Java" %}
```java
AATKit.setNetworkEnabled(<AdNetwork>, false);
```
{% endtab %}

{% tab title="Kotlin" %}
```kotlin
AATKit.setNetworkEnabled(<AdNetwork>, false);
```
{% endtab %}
{% endtabs %}

### Enable Ad Network <a href="#enable-ad-network" id="enable-ad-network"></a>

To enable an ad network that has been disabled earlier, call the following method passing the [AdNetwork](https://android-sdk.aatkit.com/references/-a-a-t-kit/com.intentsoftware.addapptr/-ad-network/index.html) to enable:

{% tabs %}
{% tab title="Java" %}
```java
AATKit.setNetworkEnabled(<AdNetwork>, true);
```
{% endtab %}

{% tab title="Kotlin" %}
```kotlin
AATKit.setNetworkEnabled(<AdNetwork>, true)
```
{% endtab %}
{% endtabs %}
