-
Notifications
You must be signed in to change notification settings - Fork 159
Description
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
- Click on the link from the app itself (ie, from chats)
- 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