Back to Guides

SDK Auto Detection Integration

Done in just 5 minutes!

Overview

LaunchPad uses Google's official Play Install Referrer API. When a tester installs your app via LaunchPad link, the app automatically detects the install source and notifies the server.

Google Official API

Safe and reliable

All Android Apps

Flutter, Unity, Kotlin, etc.

No Email Required

Auto-identified via referrer

One-line Summary

When a tester installs your app from LaunchPad, the status automatically changes to "Installed".

👇 Choose one below that matches your project: Flutter / Kotlin / Unity!

💙 Flutter Project
1Run this in terminal
flutter pub add android_play_install_referrer http
2Add this file to your project

📁 lib/launchpad.dart

import 'dart:convert';
import 'package:android_play_install_referrer/android_play_install_referrer.dart';
import 'package:http/http.dart' as http;

class Launchpad {
  /// Call this when app starts!
  static Future<void> verifyInstall() async {
    try {
      final referrer = await AndroidPlayInstallReferrer.installReferrer;
      if (referrer != null && referrer.contains('launchpad')) {
        await http.post(
          Uri.parse('https://apptesters.cc/api/verify-install'),
          headers: {'Content-Type': 'application/json'},
          body: jsonEncode({'installReferrer': referrer}),
        );
      }
    } catch (_) {}
  }
}
3Call from main.dart

⚠️ Just add this one line when app starts!

Launchpad.verifyInstall();
import 'launchpad.dart';

void main() {
  Launchpad.verifyInstall();  // Add this line!
  runApp(MyApp());
}

Done! Build your app to finish

flutter build appbundle
🤖 Android (Kotlin) Project
1Add to build.gradle

📁 Open app/build.gradle and add to dependencies

implementation 'com.android.installreferrer:installreferrer:2.2'
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
2Add this class file

📁 Launchpad.kt

import android.content.Context
import com.android.installreferrer.api.*
import okhttp3.*
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.RequestBody.Companion.toRequestBody
import org.json.JSONObject

object Launchpad {
    private val client = OkHttpClient()

    /** Call this when app starts! */
    fun verifyInstall(context: Context) {
        val referrerClient = InstallReferrerClient.newBuilder(context).build()
        referrerClient.startConnection(object : InstallReferrerStateListener {
            override fun onInstallReferrerSetupFinished(code: Int) {
                if (code == InstallReferrerClient.InstallReferrerResponse.OK) {
                    val referrer = referrerClient.installReferrer.installReferrer
                    if (referrer.contains("launchpad")) {
                        sendToServer(referrer)
                    }
                    referrerClient.endConnection()
                }
            }
            override fun onInstallReferrerServiceDisconnected() {}
        })
    }

    private fun sendToServer(referrer: String) {
        val json = JSONObject().put("installReferrer", referrer)
        val request = Request.Builder()
            .url("https://apptesters.cc/api/verify-install")
            .post(json.toString().toRequestBody("application/json".toMediaType()))
            .build()
        client.newCall(request).enqueue(object : Callback {
            override fun onFailure(call: Call, e: java.io.IOException) {}
            override fun onResponse(call: Call, response: Response) { response.close() }
        })
    }
}
3Call from Application or MainActivity

⚠️ Just add this one line when app starts!

Launchpad.verifyInstall(this)

Done! Build your app to finish

🎮 Unity Project
1Add Android plugin

📁 Assets/Plugins/Android/Launchpad.java

package com.launchpad.unity;

import android.content.Context;
import com.android.installreferrer.api.*;
import java.io.*;
import java.net.*;

public class Launchpad {
    public static void verifyInstall(Context context) {
        InstallReferrerClient client = InstallReferrerClient.newBuilder(context).build();
        client.startConnection(new InstallReferrerStateListener() {
            public void onInstallReferrerSetupFinished(int code) {
                if (code == InstallReferrerClient.InstallReferrerResponse.OK) {
                    try {
                        String referrer = client.getInstallReferrer().getInstallReferrer();
                        if (referrer.contains("launchpad")) {
                            sendToServer(referrer);
                        }
                    } catch (Exception e) {}
                    client.endConnection();
                }
            }
            public void onInstallReferrerServiceDisconnected() {}
        });
    }

    private static void sendToServer(String referrer) {
        new Thread(() -> {
            try {
                URL url = new URL("https://apptesters.cc/api/verify-install");
                HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                conn.setRequestMethod("POST");
                conn.setRequestProperty("Content-Type", "application/json");
                conn.setDoOutput(true);
                conn.getOutputStream().write(("{\"installReferrer\":\"" + referrer + "\"}").getBytes());
                conn.getResponseCode();
                conn.disconnect();
            } catch (Exception e) {}
        }).start();
    }
}
2Add dependency to mainTemplate.gradle
implementation 'com.android.installreferrer:installreferrer:2.2'
3Call from C# script

⚠️ Just add this one line when app starts!

#if UNITY_ANDROID && !UNITY_EDITOR
using var player = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
using var activity = player.GetStatic<AndroidJavaObject>("currentActivity");
using var launchpad = new AndroidJavaClass("com.launchpad.unity.Launchpad");
launchpad.CallStatic("verifyInstall", activity);
#endif

Done! Build for Android to finish

FAQ

Q: Do I need to enter email or anything?

No! All information is included in the Install Referrer, so testers are automatically identified without any additional input.

Q: Does it work for apps without Google login?

Yes! SDK auto detection works regardless of whether your app has Google login.

Q: When should I call it?

Call it once when the app starts (main function, onCreate, etc.).

🔧 Technical Details (For Developers)

Below is how SDK auto detection works internally. Beginners can skip this.

How It Works

  1. 1

    Tester clicks app install link on LaunchPad

    Link contains referrer info: utm_source=launchpad&app_id=xxx&exchange_id=yyy

  2. 2

    Install app from Play Store

    Google stores referrer info (up to 90 days)

  3. 3

    Query Install Referrer API on app launch

    App retrieves referrer info from Google Play

  4. 4

    Send referrer to LaunchPad server

    Auto-identify tester via exchange_id, update status

API Reference

Endpoint: POST https://apptesters.cc/api/verify-install

Request Body:

{
  "installReferrer": "utm_source=launchpad&app_id=xxx&exchange_id=yyy"
}