0

We are generating branch links according to the described documentation, The links work awesome when clicked from other platfomr like whatsapp, sms, browser etc, but when we share the same link within the app and click on it , we receive

{"+clicked_branch_link":false,"+is_first_session":false}

We have crosschecked all the documentation from branch io and we are following all the mentioned steps.

  1. we are initializing Branch and handling deep linking in your Splash activity
        if (BranchIOUtils.isBranchIntent(getIntent())) {
            Branch.getInstance().initSession(this, this.getIntent().getData(), this);
        }
  1. Splash activity have the launchMode set to singleTask
  <activity
            android:name=".activities.Splash"
            android:launchMode="singleTask"
            android:screenOrientation="portrait"
            android:theme="@style/AppThemeNoActionbar">
  1. overriding onNewIntent() in your Main/Splash activity
    @Override
    protected void onNewIntent(Intent intent) {
        this.setIntent(intent);
        handleIntent(getIntent());
    }
  1. Made sure we are initializing Branch with Branch.getAutoInstance(this)
        Branch.setPlayStoreReferrerCheckTimeout(10000);
        // Branch object initialization
        Branch.getAutoInstance(this);

Not able to get as to what is missing, any pointers would be of greate help .

Hari
  • 452
  • 1
  • 6
  • 16

1 Answers1

0

To deep link from within your own app, you'll have to launch a chrome intent as follows:

Intent intent = new Intent(this, ActivityToLaunch.class);
intent.putExtra("branch","http://xxxx.app.link/testlink");
intent.putExtra("branch_force_new_session",true);
startActivity(intent);

https://docs.branch.io/apps/android/#handle-links-in-your-own-app

If you have additional questions, please write into support@branch.io. Thanks.

Joon Lee
  • 332
  • 1
  • 6