Learning Android Development

5 Gotchas of Android’s Deep Link Implementation

Some possibly unknown Android Deeplink tips to discover

Photo by Mikhail Vasilyev on Unsplash

Implementing deep links in Android seems straightforward. The document shares what needs to be done. But there are some subtle traps we'll fall into if one is not careful.

I’m sharing it here for all to learn ahead.

Before that, let me share the basics first. If you are familiar with the basics, go straight to the Gotcha Section below.

To support deep links It’s simply the 2 steps below

1. Declare the needing deep link in your App

One will declare the intent-filter and data in the AndroidManifest.xml

<intent-filter android:label="@string/filter_view_http_gizmos">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"
android:host="www.example.com"
android:pathPrefix="/gizmos" />
</intent-filter>

as well as the additional handling in the code to take care of the link.

--

--