Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A Deep Dive into Deep Links

A Deep Dive into Deep Links

Deep links are an integral tool to drive users directly to specific screens within your mobile app, entering potential and returning users into a desired action flow. However, deep links can be challenging to implement because developers must manage non-typical points of entry to the app (e.g., entering the app without launching a home screen) while also managing the app’s back stack.

Using the Xfinity app as an example, we will explain how deep links work and describe the process behind creating them. We will also explore the difference between a deep link and an app link, how to associate a website to a mobile app, and how to make an app react to deep links. We will address more advanced concepts, such as:

• Testing deep links via Android Debug Bridge (adb) and Android Studio
• Debugging deep links
• Typical navigational patterns when receiving deep links
• Handling extra parameter additions to deep links
• Using custom schemas

Avatar for Chrystian Vieyra

Chrystian Vieyra

September 02, 2022
Tweet

More Decks by Chrystian Vieyra

Other Decks in Programming

Transcript

  1. A Deep Dive into Deep Links CHRYSTIAN VIEYRA CORTÉS ENGINEERING

    MANAGER SANAT TRIPATHI PRINCIPAL SOFTWARE ENGINEER 1
  2. Overview 1. A primer on deep links 2. Enabling a

    basic deep link in an Android app 3. Types of deep links and how to enable them 4. Testing deep links 5. Backstack management 6. Deferred deep linking 7. Conclusion 3
  3. What is a Deep Link? A deep link takes users

    to a specific destination within an app. PRIM ER 4
  4. Supported Links Users can view URLs that are verified for

    the app to open via deep links. PRIM ER 5
  5. Supported Links Google Play Console has a section for Deep

    links using which you can browse all the deep links configured in your app Credit: https://android-developers.googleblog.c om/2022/08/monitor-your-deep-links-in- one-place.html PRIM ER 6
  6. Intent Filter action: ACTION_VIEW • Needed for intent filter to

    be reached from Google search category: DEFAULT & BROWSABLE • DEFAULT allows the app to respond to implicit intents. Without it, the intent must specify the app component name for the activity to launch. • BROWSABLE makes the intent accessible from a web browser. data: (can consist of scheme, host, path) • Defines the URI format that resolves to destination activity. Enablin g 9
  7. Custom Schemes xfinitydigitalhome: Not often recognized on third-party apps Limited

    to use within the app You don't own the scheme – your scheme can be hijacked by other apps. Types 12
  8. Web Links Deep links that use http or https schemes.

    On Android 12 and higher, clicking a web link (that is not an app link) opens a web browser. Example web link intent filter: Types 14
  9. App Links Web links (with http / https scheme) that

    your app supports by default Register your app as default handler for certain Web link by setting “autoVerify“ attribute to “true”. Types 15
  10. App Links .well-known/assetlinks.json Asset Links is a protocol to securely

    capture statements made by digital assets such as web sites or mobile apps about their relationship with other digital assets. (Credit: https://github.com/google/digitalassetlinks/blob/master/well-known/details.md) Types 16
  11. Website Ownership Verification Publish a Digital Assets Links JSON file

    on your website to verify ownership android:autoVerify=true Configure your app to request verification of app links. Digital Assets Link must be accessible without any redirects Update robots.txt to allow crawling of /.well-known/assetslinks.json Types 17
  12. assetlinks.json Same assetlinks.json can be used for many apps (debug,

    release). Google.com has over 10 apps tied to the same domain. Website and app can share sign-in credentials delegate_permission/common .get_login_creds Types 18
  13. Testing via App Links Assistant Testing Step by step wizard

    to: • Add intent filters to your Activity • Associate app and website with Digital Asset Links • Test deep links 21
  14. Deferred Deep Linking How do you handle deep links when

    your app is not installed? - Firebase Dynamic links - Google Play referrer API A deferred deep link works like a normal deep link if the user has the app installed. New users will be redirected to Google Play. The deep link is executed when the app is first launched. Deferred 32
  15. Firebase Dynamic Links Special type of deep link Survives app

    install process Free product from Google console.firebase.google.com Creates an assetlinks.json file Source: https://www.youtube.com/watch?v=zra2DCd0DnY Deferred 35
  16. Firebase Dynamic Links: Configuration The same deep link can work

    across Android and iOS. A deep link can launch instant app, custom URL, or launch the play store app page. Can include UTM parameters. UTM = Urchin Tracking Module Deferred 37
  17. Google Play Install Referrer API allows to retrieve content from

    Google Play: • Referrer URL • Timestamp of referrer click • Timestamp of installation • Whether the user interacted with your app's instant experience in the past 7 days Deferred 41
  18. Google Play Install Referrer Establish a connection to the Play

    Store app Retrieve install referral content Data available for 90 days Deferred 42