Member-only story
Add Chrome Custom Tabs to the Android Jetpack Navigation Component
Extending Jetpack’s ability to navigate anywhere

With the introduction of Android Jetpack, developers now have a marvelous new set of libraries which offer an unprecedented level of simplicity and reusability. Before Jetpack’s debut, fragment and activity-based navigation often proved to be complicated, fragile, and nearly unique to each app on the market. Google has heard our pleas for help and given us the Navigation Component.
Current State of the Navigation Component
Since the preliminary release of the navigation component in May 2018, much of its functionality has improved, changed, and expanded. As of November 2021, the current state of this library offers native support for these destination types:
- Fragments
- Activities
- DialogFragments
Support for Chrome Custom Tabs (CCT) is a notable omission from this list. Fortunately, since CCT is similar enough in behavior to activities, it is not a significant lift to add in support for this destination type.