Deferred Deeplinking
Deferred Deeplinking allows you to navigate users to the correct content after downloading your app.
How does Deferred Deeplinking work?
When a user attempts to open a MovableInk Link that is designated as a deferred deeplink on an Android device, our SDK will allow you to direct users to specific content or actions within your app even if the app is not installed at the time the link is clicked.
Implementation
The Android SDK supports two approaches:
At present, there are two conceptual approaches to implementing Deferred Deeplinking on Android. Please note that only one of the approaches is currently available in the SDK.
When your application starts, make sure to allow the app install event if you're also using Behavior Events. This allows your marketing team to utilize this information in their email campaigns. Make sure to also check with your CX Team at Movable Ink to ensure the app install event is enabled for your company.
Approach 1: Using the Clipboard
The Clipboard approach involves copying the deep link URL to the device's clipboard when the user clicks on the link. Upon app installation, your app reads the deep link from the clipboard and navigates the user to the relevant content.
// Make sure to enable the app install event if you're using Deferred Deeplinking and Behavior Events
MIClient.appInstallEventEnabled(true)
// When the app is installed and launched for the first time, retrieve the deep link from the clipboard.
MIClient.checkPasteboardOnInstall { resolvedLink ->
// Parse the deep link and navigate the user to the appropriate content within your app.
}
Note
Android 10 (API level 29) and above introduced restrictions on clipboard access. An app can only access the clipboard data if it has focus.
Methods like onResume()
and onCreate()
might not work reliably for reading the clipboard after these changes and you should consider overriding the onWindowFocusChanged() method in your Activity.