Perkox Offerwall SDK for Android
The Perkox Offerwall SDK for Android is a lightweight SDK that allows mobile app and game developers to integrate the Perkox Offerwall directly into their Android applications.
With Perkox, users can earn in-app rewards by completing offers, surveys, and other rewarded engagement activities.
The SDK is designed to provide a simple integration flow while giving publishers access to rewarded monetization, analytics, and secure server-side reward validation.
Requirements
Before integrating the Perkox Android SDK, make sure your project meets the following requirements:
Requirement
Version
Android minSdk
21 / Android 5.0 Lollipop
Android targetSdk
33
Java
17
Kotlin
1.9.0+
AndroidX
Required
Required Permission
The SDK requires internet access to load the offerwall and communicate with Perkox services.
This permission is automatically included through Android manifest merging:
<uses-permission android:name="android.permission.INTERNET" />Installation
Step 1: Download the AAR
Download the latest SDK file:
The file should be downloaded from the official Perkox GitHub Releases page or provided by the Perkox team.
Step 2: Add the AAR to Your Project
Copy the downloaded .aar file into your app module’s libs folder.
Your project structure should look like this:
Step 3: Add SDK Dependencies
Add the Perkox SDK AAR file and required AndroidX dependencies to your app-level Gradle file.
Groovy — build.gradle
Kotlin DSL — build.gradle.kts
Quick Start
After installing the SDK, you can launch the Perkox Offerwall using your App ID, SDK Key, and a unique Player ID.
You can find your App ID and SDK Key inside the Perkox Publisher Dashboard.
Kotlin Implementation
Java Implementation
API Reference
PerkoxOfferwall
PerkoxOfferwall is the main entry point for creating and launching the Perkox Offerwall.
Method
Parameters
Returns
Description
create()
appId: String, sdkKey: String, playerId: String
Offerwall
Creates a new Offerwall instance
Offerwall
The Offerwall object is used to launch the offerwall and listen to basic offerwall events.
Method / Callback
Parameters
Description
launch()
activity: Activity
Launches the offerwall
onReward
(Map<String, Any?>) -> Unit
Callback triggered when a reward event is received
onClose
() -> Unit
Callback triggered when the offerwall is closed
Listening to Events
You can listen to reward and close events by setting callbacks before launching the offerwall.
Important Reward Handling Notice
Do not rely only on SDK reward callbacks to grant rewards to users.
SDK callbacks only work while the offerwall is active inside the app. For accurate and reliable reward processing, rewards should be handled server-side using the Postback URL configured in your Perkox dashboard.
Recommended reward flow:
Use SDK callbacks mainly for UI feedback, logs, or temporary in-app updates.
The onReward callback may be triggered multiple times for the same transaction with different statuses, such as pending, approved, rejected, or reversed.
Kotlin Event Example
Java Event Example
Reward Data Fields
When a reward event is received, the SDK may return the following fields:
Field
Type
Description
amount
Double
Reward amount
txid
String
Unique transaction ID
status
String
Reward status
player_id
String
Player ID passed during SDK initialization
Reward Statuses
Status
Description
Recommended Action
pending
Reward is being reviewed or processed
Do not grant final reward yet
approved
Reward has been validated
Credit the user server-side
rejected
Reward was not approved
Do not credit the user
reversed
Previously approved reward was reversed
Adjust or remove the reward if already credited
Player ID
The playerId should be a unique and stable identifier for the user inside your app or game.
Examples:
The Player ID is important because it allows your backend to identify which user should receive the reward.
Best practices:
Use a stable internal user ID
Do not use random temporary values
Do not use sensitive personal information
Make sure the same user keeps the same Player ID across sessions
Reward Validation Best Practice
For production integrations, Perkox recommends using server-side reward validation through postbacks.
The SDK callback is useful for listening to events inside the app, but the final reward credit should happen on your backend.
Recommended production setup:
This helps prevent duplicate rewards, missed rewards, and client-side manipulation.
Troubleshooting
1. Offerwall Not Loading
Check the following:
Verify that your
appIdis correctVerify that your
sdkKeyis correctCheck the device internet connection
Make sure the
playerIdis not emptyConfirm that your app has internet permission
Make sure the app/property is active inside the Perkox dashboard
2. AAR File Not Found
Check the following:
Make sure the
.aarfile is inside theapp/libsfolderVerify that the file name matches your Gradle configuration
Sync the Gradle project again
Clean and rebuild the project
Example:
3. Class Not Found Errors
Make sure the required dependencies are included:
For Kotlin DSL:
Then sync and rebuild your project.
4. Reward Callback Not Triggering
Possible reasons:
The offerwall was closed before the event was returned
The conversion is still pending
The reward was processed server-side through postback
The user did not complete the offer requirements
The transaction status has not changed yet
For production reward handling, always rely on server-side postbacks.
Changelog
v1.0.0
Initial Android SDK release.
Included:
Lightweight AAR integration
Perkox Offerwall launch support
Android and Java usage examples
Reward callback support
Close callback support
Server-side postback recommendation
Support
For questions, issues, or feature requests, contact:
When contacting support, include:
App ID
SDK version
Android version
Device model
Error logs if available
Description of the issue
Last updated