# 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 %}


---

# 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://docs.adjump.io/android/sdk-initialization.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.
