airbnb / airbnb/DeepLinkDispatch

[Question] Get DeeplinkResult without launching activity

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

Description

I come up with a question as I'm not sure if my usecase is supported or not.

### Usecase
- If deeplink comes from within the app (i.e. deeplink navigation within same app ), launch desired activity without touching current backstack.
- If deeplink comes from external (i.e. from social apps, notifications etc), launch desired activity with creating proper backstack.

### What I looked for
I was searching for a method that return `DeeplinkResult` but **not launching activities inside the method**, so that the returned `DeeplinkResult` can be used for general purposes.

### Example
``` kotlin

val deeplinkResult = delegate.dispatchFrom(activity, intent) // This method returns result, but it is also launching activities internally
if (comeFromExternal) {
startActivityWithProperTaskStack(deeplinkResult.intent)
} else {
startActivity(deeplinkResult.intent)
}

```

Is there any workaround for such usecase please?

Contributor guide

Open the contributing guide

Research direction

Start with the delegate.dispatchFrom entry point and the DeeplinkResult type mentioned in the issue. Determine whether dispatchFrom can return a result without launching an activity, and document or expose a supported path that preserves the requested internal and external navigation behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.