android-branch-deep-linking-attribution
android-branch-deep-linking-attribution copied to clipboard
Branch test/ live mode is not updating via enableTestMode function
Describe the bug
We have added branch live key and test key along with testMode in the AndroidManifest file as mentioned in the setup document. We want to configure testMode programmatically so we are calling enableTestMode function in the App.kt file. But it is not updating the branch key for that particular mode. However, it is working fine from AndroidManifest file.
Steps to reproduce
- Configure branch setup in the app.
- Call enableTestMode function from App.kt file.
Expected behavior
It should update the mode from App.kt file.
SDK Version
5.12.1
Make and Model
Redmi 10 Prime
OS
12
Additional Information/Context
We are calling below method from onCreate in App.kt file.
`private fun setupBranch() {
// Branch logging for debugging
if (BuildConfig.LOG_ENABLED) {
Branch.enableLogging()
}
// Branch object initialization
Branch.getAutoInstance(this)
val config = UserSettings.getAppConfig() ?: Config()
if (config.environment == BuildConfig.QA_ENVIRONMENT || config.environment == BuildConfig.DEV_ENVIRONMENT) {
Branch.enableTestMode()
}
}`