airbnb / airbnb/DeepLinkDispatch

Support for AndroidX Navigation

Open
#327 2 comments 5 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
4.4k
Forks
414
PR merge metrics
No merged PRs in 30d

Description

This library is a marvelous solution for avoiding writing boilerplate code to handle DeepLink (and also thanks you great work), but I wonder do you have plan to support [AndroidX Navigation](https://developer.android.com/jetpack/androidx/releases/navigation) library to directly support deeplinking into a Fragment or a Dialog? Nowadays DeepLinkDispatch only support navigate to Activity or launch destination defined by Intent, which is not compatible with the way Navigation library used to process DeepLink.

More specifically, AndroidX Navigation support deeplink navigation by [two methods](https://developer.android.com/guide/navigation/navigation-deep-link): explicitly create an PendingIntent and call send() method, or implicitly generate support code from navigation xml file. Since this library could only directly routing to Activity by annotation or indirectly launching a user-defined Intent, these two methods cannot work with DeepLinkDispatch, therefore we could only handle links in Activity holding NavHost, and manually send arguments to navController to the final destination Fragment or Dialog.

Could it be some way to deal with this situation?

Contributor guide

Open the contributing guide

Research direction

Start by reading DeepLinkDispatch's current Activity routing and the AndroidX Navigation deep-link documentation, focusing on PendingIntent handling and navigation XML-generated support code. Compare those flows with the Activity hosting a NavHost and its navController handoff. Done means a documented, tested approach that directly reaches Fragment or Dialog destinations without manual argument forwarding.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.