Skip to main content

Android (Kotlin) SDK - One-page setup

Create your app and get the key

  1. Log in to testernest.com and create an app.
  2. Copy the publicKey from your app settings.

Add the dependency (Maven Central)

In settings.gradle.kts (recommended):

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
google()
}
}

Then in app/build.gradle.kts:

dependencies {
implementation("com.testernest:sdk-android:1.0.0")
}

Add permissions

In AndroidManifest.xml:

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

Initialize in Application

Create an Application class (or reuse existing) and initialize:

class App : Application() {
override fun onCreate() {
super.onCreate()
TesterNest.initialize(
context = this,
publicKey = "YOUR_PUBLIC_KEY",
baseUrl = "https://api.testernest.com" // optional
)
}
}

Register it in AndroidManifest.xml:

<application
android:name=".App"
...>
</application>

Attach the connect prompt

In your main Activity, show the prompt in onResume():

override fun onResume() {
super.onResume()
TesterNest.showConnectPrompt(this)
}

Testers should see a 6-digit code prompt when they open the app.

Verify (Logcat)

Filter Logcat for the following tags:

  • BOOTSTRAP
  • BATCH
  • CLAIM

You should see events after entering a valid 6-digit code.

Troubleshooting

  • Prompt not showing: Ensure showConnectPrompt() runs in onResume().
  • Invalid key: Verify the publicKey matches the app in the dashboard.
  • No network: Confirm permissions and device connectivity.
  • No logs: Check that the Application initialize() runs on app start.