airbnb / airbnb/DeepLinkDispatch

How to compose a deeplink with parameters programmatically ?

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

Description

Hi,

will be great to introduce API that allows to compose deeplink with parameters programmatically...

1) compose deeplink (pseudo code):
```
return Uri.parse(MainActivity.DEEPLINK_SHOW_ON_MAP)
.buildUpon()
.clearQuery()
.appendQueryParameter("lat", String.valueOf(latLng.latitude))
.appendQueryParameter("lon", String.valueOf(latLng.longitude))
.build();

```

2) trigger deeplink:
```
/** Trigger deeplink resolving over the deep link handler activity. */
@MainThread
public static boolean trigger(@NonNull final Context context, @NonNull final Uri deeplink) {
final Intent intentLink = new Intent(context, DeepLinkingActivity.class)
.setData(deeplink);

context.startActivity(intentLink);

return true;
}

```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing deeplink handling around MainActivity.DEEPLINK_SHOW_ON_MAP and DeepLinkingActivity, including the trigger method shown in the issue. Determine how a public API could compose deeplinks with query parameters and trigger resolution; done means the proposed API supports the demonstrated latitude and longitude flow.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.