Revlum Android SDK

This page will guide you through the integration of Revlum in your android app

1. Add Grade Dependency

In your settings.gradle(or build.gradle if using an older Android Studio project) add the dependency with the maven URL to our SDK. For example:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        maven {
            url = uri("https://revlum-android-sdk.s3.amazonaws.com/")
            content {
                includeGroup("com.revlum")
            }
        }
        google()
        mavenCentral()
    }
}

In the module-level build.gradle add the dependency to the Revlum SDK:

dependencies {

    //...other dependencies...
    implementation("com.revlum:offerwallsdk:1.0.9")
}

2. Register the Activity

Add the OfferwallActivity to your app's AndroidManifest.xml file.

<application

...

<activity
	android:name="com.revlum.offerwallsdk.OfferwallActivity">
</activity>

</application>

3. Initialize the SDK

At any point before launching the offer wall activity, set up the offer wall configuration by calling the offerwall.configure the method and provide it with an API key and a user ID.

import com.revlum.offerwallsdk.Offerwall

...

Offerwall.configure(apiKey = "myapikey1234567890", userId = "myuserid")

4. Show the Offerwall

Launch the offerwall activity by calling the Offerwall.launch method, providing it the context.

import com.revlum.offerwall.Offerwall

...

Offerwall.launch(context = context)

If you're using Jetpack Compose, you can get the context through the LocalContext class.

import androidx.compose.ui.platform.LocalContext

...

val context = LocalContext.current

if not, pass it your current activity or fragment.