Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Implement Deep Linking for Android

Learning Objectives

After completing this unit, you’ll be able to:

  • Understand how Android and Marketing Cloud Engagement route deep links from emails.
  • Implement deep links to Android apps.

Pia is working with the NTO developers to implement mobile app changes for Android 12, so it makes sense that she wants to follow the latest procedures for the mobile platform. Starting with Android 12, any links to a mobile app that are not referenced in an assetlink.json file are automatically routed to the mobile device’s default browser.

Note

You may need to account for previous versions of Android in your app, and we recommend contacting a Marketing Cloud Engagement Success Manager for more information about this process and what you need to consider.

This means that users no longer receive a window asking them whether they want to open the link in a browser window or in the app. This change provides a little extra security to deep linking interactions by preventing automatic access to a mobile device’s app, and it also improves the user experience by removing yet another click. This file is similar to the apple-app-site-association used for iOS Universal Links, just tailored to Android’s specifications. Take a look at the sample file to see what your file should look like.

[{
   "relation": ["delegate_permission/common.handle_all_urls"],
   "target": {
     "namespace": "web",
     "site": "https://www.example.com"
  }
},{
   "relation": ["delegate_permission/common.handle_all_urls"],
   "target": {
     "namespace": "android_app",
     "package_name": "org.example.ourapp",
     "sha256_cert_fingerprints": ["10:39:38:EE:45:37:E5:9E:8E:E7:92:F6:54:50:4F:B8:34:6F:C6:B3:46:D0:BB:C4:41:5F:C3:39:FC:FC:8E:C1"]
  }
}]

All this code directs the message as shown in this figure.

Flowchart presents the path of a clicked link being evaluated for an Android link, then opening in either the app, a drawer in the app,  or the browser

Complete the Settings in Marketing Cloud Engagement Setup

Pia has the developers insert the links that go directly to the app in the assetlinks.json file. She also makes sure that they add NTO’s Marketing Cloud Engagement click domain as an intent filter in their Android manifest. After confirming everything is in place, she’s ready to upload the file to Marketing Cloud Engagement.

  1. Pia navigates to Setup in Marketing Cloud Engagement.
  2. She clicks Feature Settings in the Platform Tools section of the Setup menu.
  3. She clicks Email Studio, then selects Deep Linking Applications.
  4. She clicks Browse, then selects the file to upload and clicks Save.
  5. She waits about 10 minutes for the upload process to complete, then goes to the URL specified in the app and makes sure everything looks correct.

Android Deep Linking Setup Screen with fields for the endpoint where the file is hosted and a JSON File

Again, this process requires extensive testing to make sure all the links work correctly and nothing is broken. If they need to fix anything, or when Pia needs to make changes in the future, she can just upload a new version of the file using this same process.

Obviously, keeping up with changing mobile apps and marketing campaign needs means that Pia will need to modify both iOS and Android resources in the future. However, Marketing Cloud Engagement makes testing and implementing these changes more manageable.

Resources 

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios