# SDK Initialization

### Initializing the AdJump.

You must initialize the AdJump SDK before you can use any of its features.

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

```java
AdJump adjump = new AdJump(Context context, String accountid, String appid, String userId);
```

{% endtab %}

{% tab title=" Kotlin" %}

```kotlin
val adjump = AdJump(context:Context, accountid:String, appId:String, userId:String)
```

{% endtab %}
{% endtabs %}

The parameters to this call are as follows:

| Parameter | Description                                              |
| --------- | -------------------------------------------------------- |
| context   | Your application's context.                              |
| accountId | Your Adjump account id.                                  |
| appId     | Your Adjump application id.                              |
| userId    | The registered User Id associated with your application. |

### **Initialize AdJump SDK**:

Initialize the AdJump OfferWall SDK by invoking the `initialize` function

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

```java
AdJump.InitialisationListener initialisationListener = new AdJump.InitialisationListener() {
            @Override
            public void onInitialisationSuccess() {
                runOnUiThread(() -> {
                    Log.i("AdJump", "Initialization Success");
                });
            }

            @Override
            public void onInitialisationError(Exception exception) {
                runOnUiThread(() -> {
                    Log.e("AdJump", "Initialization Error: " + exception.getMessage());
                });
            }
        };
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
val initListener = object : AdJump.InitialisationListener {
    override fun onInitialisationSuccess() {
        runOnUiThread {
            Log.i("AdJump", "Initialization Success")
        }
    }

    override fun onInitialisationError(exception: Exception) {
        runOnUiThread {
            Log.e("AdJump", "Initialization Error: ${exception.message}")
        }
    }
}
```

{% endtab %}
{% endtabs %}

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

```java
Boolean showBottomSheet = true //Make this true. 
//If you want to show the Special Offer BottomSheet.
adJump.initialize(initialisationListener, showBottomSheet);

//show the bottom sheet.
adJump.showBottomSheet((Activity) context);
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
adJump.initialize(listener = initialisationListener, showBottomSheet=false);

adJump.showBottomSheet(context as Activity);
```

{% endtab %}
{% endtabs %}

### Open the Adjump offerwall

To initiate the OfferWall, simply invoke the `launchOfferWall` method.

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

```java
if (adjump.isAvailable()) {
adjump.launchOfferWall(); 
} else {
// show some message or alert when adjump is not available!
// or reinitialize Adjump
}
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
if (adjump.isAvailable) {
    adjump.launchOfferWall()
} else {
    // show some message or alert when adjump is not available!
    // or reinitialize Adjump
}

```

{% endtab %}
{% endtabs %}
