Move your Android integration to production
When you have finished integrating and testing the Connect SDK in development, work through this guide to move your integration to production.
Languages: Kotlin and Java
Availability: Pro, Premium, and Ultimate
Before you begin
Several sections below add settings to ConnectBasicConfig.properties. If you do not have this file yet, create it at exactly app/src/main/assets/ConnectBasicConfig.properties — the SDK looks up the file by that exact name and location. If the path or name does not match, the SDK silently falls back to its bundled defaults and your overrides have no effect.
For the full list of supported settings and their defaults, see the Connect Android SDK configuration reference.
Set up production credentials
Before you ship to production, ask your Connect administrator to create a dedicated Mobile app integration in Connect for the production build. Using distinct app keys for development and production keeps test sessions out of your production reports in Connect and gives you a per-environment kill switch — the kill switch URL embeds the app key, so separate keys mean you can disable Connect in production without affecting test.
Where your development Mobile app integration lives depends on whether your company has a separate Connect subscription for testing.
Both subsections below use BuildConfig fields for environment-specific credentials. If your team already manages config files per build type, you can alternatively store credentials in ConnectBasicConfig.properties and pass null to Connect.enable() — maintain separate copies of the file for each build type, using the same folder structure as google-services.json.
Select the option that matches your company's setup:
Both Mobile app integrations live in your production subscription. The collector URL is the same for both — only the app key differs.
Define a BuildConfig field for your development and production app keys in your app-level build.gradle.kts:
android {
buildTypes {
debug {
buildConfigField("String", "APP_KEY", "\"YOUR_DEV_APP_KEY\"")
}
release {
buildConfigField("String", "APP_KEY", "\"YOUR_PROD_APP_KEY\"")
}
}
}Then reference it in the SDK initialization. The collector URL stays inline since it does not change between builds:
Connect.enable(
appKey = BuildConfig.APP_KEY,
postMessageUrl = "YOUR_COLLECTOR_URL"
)Mask PII in session replay (Ultimate only)
Before releasing your app to production, mask the personally identifiable information (PII) that session replay would otherwise capture from your screens. See the guide for your architecture: View system or Compose.
Push notification settings
This section applies only to apps with push notifications enabled.
Firebase
During development you used a single Firebase project. For production, use a dedicated Firebase project to keep test data separate from live data and avoid sending test push notifications to production users.
- Create a production Firebase project in the Firebase console and download its
google-services.json. - Place each
google-services.jsonin the corresponding build type folder so Gradle picks up the right file automatically:
app/
src/
debug/
google-services.json ← development Firebase project
release/
google-services.json ← production Firebase project
- Generate a service account key for the production Firebase project and share it with your Connect administrator. Ask them to create a separate Mobile app integration in Connect for production. There is no environment setting in Connect — use the integration name or description to distinguish them (for example, "My App — Dev" and "My App — Prod").
- Update your app initialization to use the production app key provided by your Connect administrator.
Verify production push delivery
Before releasing to the Play Store, confirm the production push path end to end:
- Build and install a release build on a physical device.
- Grant notification permission when prompted.
- Verify that a push token is received via the
onTokenReadycallback. - Coordinate with your marketing team to send a test push to your device.
- Verify the notification appears, images load, and push signals appear in the contact's activity feed in Connect.
Huawei
During development you used a single AppGallery Connect app. For production, use a dedicated app to keep test data separate from live data and avoid sending test push notifications to production users.
- Create a production app in AppGallery Connect and download its
agconnect-services.json. - Generate the SHA-256 fingerprint for your release signing certificate and register it in AppGallery Connect under General information > SHA-256 certificate fingerprint. Re-download
agconnect-services.jsonafter registering the fingerprint. - Place each
agconnect-services.jsonin the corresponding build type folder so Gradle picks up the right file automatically:
app/
src/
debug/
agconnect-services.json ← development AppGallery Connect app
release/
agconnect-services.json ← production AppGallery Connect app
- Copy the HMS client ID, project ID, application ID, and client secret from the production
agconnect-services.jsonand share them with your Connect administrator. Ask them to create a separate Mobile app integration in Connect for production. - Update your app initialization to use the production app key provided by your Connect administrator.
Verify production push delivery
Before releasing to AppGallery, confirm the production push path end to end on a physical Huawei device:
- Build and install a release build on a physical Huawei device.
- Grant notification permission when prompted.
- Verify that a push token is received via the
onTokenReadycallback. - Coordinate with your marketing team to send a test push to your device.
- Verify the notification appears, images load, and push signals appear in the contact's activity feed in Connect.
Configure the kill switch
The kill switch lets you remotely disable the Connect SDK on end users' devices without a new app release.
-
Build your kill switch URL by taking your collector URL, replacing
collectorPostwithswitch, and appending/{your_app_key}.For example, if your collector URL is
https://lib-us-2.brilliantcollector.com/collector/collectorPostand your app key is855e660c300000, your kill switch URL ishttps://lib-us-2.brilliantcollector.com/collector/switch/855e660c300000. -
In
app/src/main/assets/ConnectBasicConfig.properties, setKillSwitchEnabledtotrueand add your kill switch URL:KillSwitchEnabled=true KillSwitchUrl=https://lib-us-2.brilliantcollector.com/collector/switch/YOUR_APP_KEY
NoteThe app will not initialize correctly until a valid kill switch URL is set, or
KillSwitchEnabledis explicitly set tofalse.
Disable Logcat output
The Connect SDK ships with verbose Logcat output enabled by default. This is useful during integration but generates significant log volume in production. Before releasing your app, disable Logcat output by adding an override to your project.
- In your Android project, create
app/src/main/assets/EOCoreBasicConfig.propertiesif it does not already exist. - Add the following line:
DisplayLogging=falseWith DisplayLogging=false, the SDK suppresses all Logcat output except ERROR-level messages. Errors continue to surface so you can troubleshoot SDK issues in production. Any settings you do not include in your EOCoreBasicConfig.properties file inherit the SDK's bundled defaults.
This setting controls Logcat output only. It does not affect what the SDK captures or posts to the Connect collector.
ProGuard rules
The Connect SDK ships with consumer ProGuard rules that Gradle applies automatically when you add it as a Maven dependency. No manual configuration is required.
Updated 3 days ago
