# Use and installation

At this point, you should have your Publisher Key with you, you'll need it to initialize the SDK.

## Initialize the SDK

Our recommendation is to initialize the SDK inside the `Application` class of the app to guarantee the best results for monetization, although it can be done in any main `Activity` too

{% tabs %}
{% tab title="Java" %}

```java
NetsocksSdk.enable(this, "YOUR PUBLISHER KEY");
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
NetsocksSdk.enable(this, "YOUR PUBLISHER KEY")
```

{% endtab %}
{% endtabs %}

By initializing the SDK this way will automatically enable monetization. No further action is required unless you want to condition monetization based on user consent

## Verify if monetization is enabled

To determine if the Netsocks SDK is enabled, you can use the following method, providing the context of either the application or the activity

{% tabs %}
{% tab title="Java" %}

```java
NetsocksSdk.isEnabled(this);
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
NetsocksSdk.isEnabled(this)
```

{% endtab %}
{% endtabs %}

## Disable monetization

In case a user has not given their consent, you can disable monetization using the following method

{% tabs %}
{% tab title="Java" %}

```java
NetsocksSdk.disable(this);
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
NetsocksSdk.disable(this)
```

{% endtab %}
{% endtabs %}

Remember to check the consent section for more information on what to do if the user chooses to not accept Netsocks SDK.
