BranchMetrics / android-branch-deep-linking-attribution

The Branch Android SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/pages/apps/android/
MIT License
401 stars 156 forks source link

Branch test/ live mode is not updating via enableTestMode function #1209

Closed aadityapaliwal closed 1 month ago

aadityapaliwal commented 3 months ago

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

  1. Configure branch setup in the app.
  2. 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()
        }
    }`
github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale due to inactivity for 60 days. If this issue is still relevant, please respond with any updates or this issue will be closed in 7 days. If you believe this is a mistake, please comment to let us know. Thank you for your contributions.

github-actions[bot] commented 1 month ago

This issue has been closed due to inactivity. If this issue is still relevant, please reopen it or create a new one. Thank you for your contributions.