Skip to content

Intra app navigation is not working. branch_force_new_session is always false. But the navigation from the other apps is working #1334

@abijith9567

Description

@abijith9567

Describe the bug

in main activity
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
this.setIntent(intent);
if (intent != null && intent.hasExtra("branch_force_new_session") && intent.getBooleanExtra("branch_force_new_session",false)) {
Branch.sessionBuilder(this).withCallback { referringParams, error ->
if (error != null) {
Log.e("BranchSDK_Tester", error.message)
} else if (referringParams != null) {
Log.i("BranchSDK_Tester", referringParams.toString())
}
}.reInit()
}
}

and in main activity onStart() method
private fun initializeBranchIO(){
Branch.sessionBuilder(this).withCallback { branchUniversalObject, linkProperties, error ->
if (error != null) {
Log.e("BranchSDK_Tester", "branch init failed. Caused by -" + error.message)
} else {
Log.i("BranchSDK_Tester", "branch init complete!")
if (branchUniversalObject != null) {
Log.i("BranchSDK_Tester", "title " + branchUniversalObject.title)
Log.i("BranchSDK_Tester", "CanonicalIdentifier " + branchUniversalObject.canonicalIdentifier)
Log.i("BranchSDK_Tester", "metadata " + branchUniversalObject.contentMetadata.convertToJson())
}
if (linkProperties != null) {
Log.i("BranchSDK_Tester", "Channel " + linkProperties.channel)
Log.i("BranchSDK_Tester", "control params " + linkProperties.controlParams)
}
handleBranchLink(branchUniversalObject)
}
}.withData(this.intent.data).init()
}

Steps to reproduce

  1. Click on the link from the app itself (ie, from chats)
  2. no navigation occurs.

Expected behavior

I want to navigate with in the app.

SDK Version

5.20.3

Make and Model

xiamo redmi note 14 pro

OS

14

Additional Information/Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions