Android SDK

Monetize your Android apps with our survey offerwall and replace in-app purchases with surveys.

SDK Updates & Changelog

We optimize our SDKs frequently to provide the maximum value to you, the publisher. Our past updates to the SDK have improved conversion rates, added features, and optimized the user experience. Find out about our recent changes in our SDK Changelog.

1. Get your API Key

Sign up for a new developer account and create a new App. Copy your App Token to initiate the SDK.

2. Install the SDK

Add the following code above the dependencies section of your app-level build.gradle file:

repositories {
   maven {
       url "https://dl.bintray.com/bitburst/mobile"
   }
}

Then add the dependency to the same file:

dependencies {
   // other dependencies

   implementation 'ai.bitlabs:sdk:1.1.9'

   // other dependencies
}

Add following permissions to your app:

<uses-permission android:name="android.permission.INTERNET" />

3. Use the SDK

Initiate the SDK before you use it:

//Kotlin
BitLabsSDK.init(<context>, "YOUR-TOKEN", "YOUR-USER-ID");

//Java
BitLabsSDK.Companion.init(<context>, "YOUR-TOKEN", "YOUR-USER-ID");

Call the .show() function to open the Offer Wall/Direct Link

//Kotlin
BitLabsSDK.show(<context>)

//Java
BitLabsSDK.Companion.show(<context>);

Use .surveyAvailable() to check if a survey is available for the user

//Kotlin
BitLabsSDK.surveyAvailable()

//Java
BitLabsSDK.Companion.surveyAvailable();

Optional Setup:
Use .setTags() to pass additional parameters to the SDK you would like to receive in your callback

//Kotlin
val tags: MutableMap<String, Any> = java.util.HashMap()
tags["my_tag"] = "new_user"
tags["is_premium"] = true
BitLabsSDK.setTags(tags)

//Java
Map<String, Object> tags = new HashMap<>();
tags.put("my_tag", "new_user");
tags.put("is_premium", true);
BitLabsSDK.Companion.setTags(tags);

4. Set up your callbacks

Setting up callbacks can be done on the dashboard. Follow the instructions and examples in our Server to Server Callback Article to properly set up callbacks.

Ready to get started?

Get Started