What are DeepLinks? | Sailesh Verma

What are DeepLinks?

Deep links are URLs (Uniform Resource Locators) that directly point to a specific page or content within a mobile application , bypassing the home page or main landing page. They allow users to navigate directly to a particular section, feature, or piece of content within an app , enhancing the user experience and reducing friction.


In the context of mobile applications, deep links are particularly useful. When a user taps on a deep link, it can open the relevant app directly, taking them to a specific screen or content within the app instead of launching the app's default starting point. This seamless transition from an external source, such as a website or another app, to a specific location within an app provides a more integrated and intuitive experience for users.

Deep links typically include a custom URL scheme or a universal link for iOS devices or an intent URI for Android devices. These links are structured in a way that identifies the target app, along with the specific content or action to be performed within the app.

For example, a deep link for a music streaming app could be used to take users directly to a playlist or a specific song, while a deep link for an e-commerce app might lead users to a particular product page. Deep links can be used for various purposes, such as sharing content, referral programs, personalized onboarding experiences, and re-engaging users with specific features or updates.

DeepLinks in Flutter with Uni Links:

Uni Links (uni_links) is a Flutter plugin used for receiving incoming App/Deep Links (for Android) and universal links and custom URL schemes (for iOS).

It currently supports Android, iOS, and web platforms.

In Android, there are two types of Uni Links:

App Links: This link requires a specified host, a hosted file (assetlinks.json), and it only works with the https scheme (https://your_host).

Deep Links: This link doesn’t require a host, a hoster file, or any custom scheme. It provides a way to utilize your app using URL: your_scheme://any_host.

In iOS, there are also two types of uni links:

Universal Links: These only work with the https scheme and require a specified host, entitlements, and a hosted file. Similar to App Links in Android.

Custom URL: This URL doesn’t require a host, entitlements, a hosted file, or any custom scheme. Similar to a Deep Link in Android

There are two ways that your app will handle a deep link:

Cold start: A cold start is starting the app anew if the app was terminated (not running in the background). In this case, _initURIHandler will be invoked and have the initial link

Coming back to the foreground: If the app is running in the background and you need to bring it back to the foreground, the Stream will produce the link. The initial link can either be null or be the link with which the app started