adjust-icon

Set up direct deep linking

When a user with your app installed clicks an Adjust link, direct deep linking ensures they’re taken directly to specific content within the app.

Android provides two methods for receiving direct deep links. Within each method, you’ll pass the deep link to the Adjust SDK using one of the following methods:

Setup

Use the processAndResolveDeeplink method, which does the following:

  • Records attribution from deep link clicks
  • Resolves short branded links to their long branded link equivalent
  • Passes through all other links as is

Your app can then handle the resolved link by parsing it and navigating to the appropriate screen. You can use this method for all deep links, including Adjust long branded links, other Android App Links, and app scheme deep links.

Method signature
public static void processAndResolveDeeplink(AdjustDeeplink adjustDeeplink, Context context, OnDeeplinkResolvedListener callback)

The processDeeplink method records attribution from deep link clicks if you’re not using short branded links.

Method signature
public static void processDeeplink(AdjustDeeplink adjustDeeplink, Context context)

The processAndResolveDeeplink method supersedes this legacy method.

Implementation

Add the following code to your main activity to handle the deep link.

If you are using the Dedicated Deep Link Activity Approach, you also need to create a file such as the following: