Android Channel Parameter Options
Android teams usually need to know which channel, campaign, or partner brought an install. The right approach depends on where the app is distributed and whether you can keep one signed APK.
Option 1: Google Play Install Referrer
Section titled “Option 1: Google Play Install Referrer”Google Play Install Referrer is the standard choice for apps distributed through Google Play. Play stores the referrer value and the app reads it after installation.
Use it when:
- the app is published on Google Play;
- installs come through Play;
- you do not need a self-hosted download page.
It does not cover direct APK distribution outside Google Play, enterprise stores, or partner download pages.
Option 2: One APK per channel
Section titled “Option 2: One APK per channel”Building a separate APK for each channel gives each package a hard-coded value. It is simple to reason about, but it multiplies build, signing, testing, and release work.
This approach also makes it easy to ship an APK that was never tested under the exact signature users receive. For a small number of permanent channels it can still be reasonable.
Option 3: Inject the value at download time
Section titled “Option 3: Inject the value at download time”With APK Ref Injector, one signed base APK stays in place. A download URL carries the channel value:
https://download.example.com/d/com-example-app/base.apk?referer=partner-aThe service attaches the value to the download response. The Android app reads it through the AAR SDK after launch. The original APK signature remains valid.
This fits:
- self-hosted or partner download pages;
- enterprise and regional distribution;
- campaigns that change faster than the release cycle;
- teams that want to avoid re-signing.
Reading the value in Android
Section titled “Reading the value in Android”Add the AAR to the app and call the reader:
val result = RefererReader.read(context)when (result) { is RefererResult.Found -> { val channel = result.referer // attribute the install } RefererResult.NotFound -> { // no channel value was attached } is RefererResult.Error -> { // handle or log the error code }}Run the read off the main thread when it is part of startup work. It reads the currently installed APK and does not require storage permission.
Choosing an approach
Section titled “Choosing an approach”| Distribution | Recommended option |
|---|---|
| Google Play only | Google Play Install Referrer |
| A few fixed enterprise channels | Per-channel APK |
| Self-hosted or partner downloads | Download-time injection |
| Mixed Play and direct distribution | Combine Play referrer with the AAR reader |