Skip to content

How to compose a deeplink with parameters programmatically ? #165

Open
@OleksandrKucherenko

Description

@OleksandrKucherenko

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();

  1. 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;
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions