Search code examples
androidbranch.iochrome-custom-tabs

Chrome custom tab stopping when opening deeplink through it


When I launch a deep-link(which directs to within app activity) inside chrome custom tabs,than app gets closed. Not able to figure out any reason yet. I am using Branch.io for deeplinking.

Expected behavior is to open the activity which is redirected from link.

For More Detail:

  • Inside my application,there is Activity A, I clicked on a link inside Activity A
  • Than that link opens in Chrome CustomTabs by calling launchUrl() from Activity A
  • Now That link which was clicked from Activity A is actually a Deep Link, of which browser behavior was, it open my Application Activity B from my browser
  • But when this link opens CustomChromeTab My application Closes, without going to Activity B as desired
  • Lastly I cannot see any error in logcat

Solution

  • EDIT: this actually might be due to a bug we had in a recent version of the Branch SDK on Android. Could you confirm you're using v2.4.4 or higher?

    Alex from Branch.io here: glad to hear you're finding Branch links useful! Branch doesn't actually support within-the-app deep linking, which sounds like what you're trying to implement. You'd be better off using standard mechanisms for moving between activities within the app, and rely on Branch to handle users coming from outside of it.