Offerwall SDK Integration: Android Complete Tutorial

·

Offerwall Placement Strategy

Offerwall SDK Integration: Android Complete Tutorial

Prerequisites


Step 1: Add the SDK

Download the Perkox Android SDK (.aar) from the Perkox GitHub Releases page. Place it in app/libs/perkox-android-sdk-release.aar.

dependencies {
    implementation files('libs/perkox-android-sdk-release.aar')
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.core:core-ktx:1.10.1'
}

Step 2: Initialize the SDK

import com.perkoxofferwall.sdk.PerkoxOfferwall

val offerwall = PerkoxOfferwall.create(
    "YOUR_APP_ID",   // Your App ID
    "YOUR_SDK_KEY",  // Your SDK Key
    "Player_123"     // Unique player ID
)
offerwall.launch(this)

Step 3: Handle Events

offerwall.onReward = { reward ->
    val amount = reward["amount"] as Double
    val status = reward["status"] as String
    val txid = reward["txid"] as String
    Log.d("Perkox", "Reward: $amount, Status: $status")
}
offerwall.onClose = {
    Log.d("Perkox", "Offerwall closed")
}

SDK callbacks are for UI feedback only. The actual reward credit happens on your server via S2S postback.


Step 4: Configure Postback

In the Perkox Publisher Dashboard, set your postback URL. Handle four reward statuses: pending (wait), approved (credit), rejected (ignore), reversed (remove credit).


Troubleshooting

Offerwall not loading: Verify appId and sdkKey. Check internet connection. Confirm app is active in dashboard.
AAR not found: Verify file path and Gradle sync.
Reward callback not triggering: Check if offerwall is still open. Rely on server-side postbacks for production.


Get started with Perkox →

Start monetizing your app with Perkox.

One SDK. Android, iOS, React Native, Flutter, Unity. A premium reward layer for your non-paying users — live in about 10 minutes.

Related articles