Deep links are URIs (Uniform Resource Identifiers) that direct users to specific pages within your app. They enhance user experience by guiding them directly to relevant content after they interact with a link.
The Adjust Android Extension for the Adobe Experience SDK supports two types of deep linking, based on whether the user has already installed your app:
- Direct deep links: If the user already has your app installed, the link opens the specified page.
- Deferred deep links: If the user doesn’t have your app installed, the link directs them to the app store to install it. After installation, the app opens the specified page.
Reattribute users with direct deep links
You can reattribute your users by sending deep link information to Adjust. When a user engages with a deep link, you can send this data to Adjust to update their attribution information.
First, create an
AdjustDeeplink
instance with your deep link URI. TheAdjustDeeplink
class validates this URI and checks the formatted string to ensure successful processing.Then, call the
Adjust.processDeeplink
function to handle the deep link and pass the information to Adjust.
The AdjustDeeplink
class constructor requires the following argument:
url
:Uri
The deep link URI that opens your app.
The Adjust.processDeeplink
function requires the following arguments:
adjustDeeplink
:AdjustDeeplink
The
AdjustDeeplink
instance you created.context
:Context
The application context.
Deferred deep link callbacks
The Adjust Android Extension for Adobe Experience SDK opens deferred deep links by default. To control this behavior, or perform validation before the deep link is opened, configure the extension to call a function when the app opens via a deferred deep link.
- Call
setOnDeferredDeeplinkResponseListener
on yourAdjustAdobeExtensionConfig
instance. - Call
AdjustAdobeExtension.setConfiguration
to set your configuration.
The OnDeferredDeeplinkResponseListener
function requires the following argument:
onDeferredDeeplinkResponseListener
:OnDeferredDeeplinkResponseListener
A function that returns a
boolean
value. If it returnsfalse
, the extension won't open the deferred deep link.
Tutorial: Create a deferred deep link function
If you followed the integration guide, you've already configured the Adjust Extension to process and open deep links. If you haven't done this, refer to set up deep link handling for instructions.
In this tutorial, you'll learn how to create a callback function that controls deep linking functionality using the setOnDeferredDeeplinkResponseListener
method. The function will open the link depending on the following condition:
"If the deep link contains "no_open"
, the app won't open it."
The result looks like this:
Here's what you need to do:
Inside the
try...catch
block, call thesetOnDeferredDeeplinkResponseListener
method of yourAdjustAdobeExtensionConfig
instance. Pass anOnDeferredDeeplinkResponseListener
instance as an argument.Create a new public function called
launchReceivedDeeplink
inside yourOnDeferredDeeplinkResponseListener
declaration. This method takes aUri
argument and returns aboolean
.Add an
if
condition to thelaunchReceivedDeeplink
to check if thedeeplink
contains the value"no_open"
. If the string is found, the function returnsfalse
, and the app shouldn't open the deferred deep link.Finally, add an
else
block to returntrue
if the deep link doesn't contain"no_open"
.
That's it! When a user opens your app with a deferred deep link, the Adjust Extension will check if the link contains the string "no_open"
. If it does, the app won't open the deep link.