Integration quickstart

Get PromptSurge running in your app in under a day.

Prerequisites

1. Install the SDK

Add JitPack to your root settings.gradle.kts:

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://jitpack.io") }
    }
}

Then add the SDK to your app's build.gradle.kts:

dependencies {
    implementation("com.github.PromptSurge-SDK:sdk-android:0.1.0")
}

Sync Gradle. No additional permissions are required in AndroidManifest.xml.

2. Initialize

Initialize once, early in your Application.onCreate():

import com.promptsurge.sdk.PromptSurge

class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        PromptSurge.initialize(this, "ps_live_your_key_here")
    }
}

Store your API key in local.properties or BuildConfig — never commit it to source control.

3. Trigger a prompt

Call requestReview() at a natural win moment — after a user completes a level, finishes an import, or achieves a milestone:

// In an Activity (AppCompatActivity works)
PromptSurge.requestReview(this)

// Or from a Fragment
PromptSurge.requestReview(requireActivity())

The SDK handles all eligibility checks automatically:

4. Opt-out support

Expose an opt-out option in your privacy settings:

// Opt the user out — persists across restarts, stops all SDK activity
PromptSurge.optOut(context)

// Re-enable if the user changes their mind
PromptSurge.optIn(context)

API reference

MethodDescription
initialize(context, apiKey)Initialize the SDK. Call once in Application.onCreate().
requestReview(activity)Show the pre-prompt if eligibility checks pass. Launches Play review on confirm.
optOut(context)Permanently suppress all SDK activity for this device.
optIn(context)Re-enable SDK activity (if user opts back in).
setLocaleOverride(locale?)Override the device locale used to fetch prompt copy. Pass null to clear.
clearRateLimitForTesting()Reset cooldown timestamps. Debug builds only.

Apple / Google compliance

PromptSurge is designed from the ground up to comply with both Apple App Store Review Guideline 5.6.1 and Google Play's in-app review policy:


Need help?

Email us at [email protected] or open the dashboard to manage your prompts and view metrics.

Open dashboard →