How to Configure Deep Links in Android app and Short.io

How to Configure Deep Links in Android app and Short.io

Short.io provides deep linking for Android apps. Example: When users click a short link that is correctly configured in your Android app, they will be redirected to the app, if it is installed. If the application is not installed, the URL will be opened in a browser.

Note: Deep linking requires the **Team Plan**.

Try Short.io Deep links

Get Started for free
  • Active short domain.

  • Android 6.0 or later.

How to configure deep links in Short.io and Android App

1. Open the AndroidManifest.xml file.

shortio-deep-links

2. Add intent filters to the manifest.

We inform the Android system that the link must be opened in the application, not on the website.

Add intent filters between activity: https://codepen.io/Shortio/pen/oNbYWOM

shortio-deep-links

3. Configure deep links on Short.io.

shortio-deep-links
  • Specify Android App Package name and SHA256 Fingerprint Certificate > Save.

Here's how to find Android App Package name and SHA256 Fingerprint Certificate: https://help.short.io/en/articles/4171170-where-to-find-android-app-package-name-and-sha256-fingerprint-certificate

shortio-deep-links

4. Add commands to process deep links in the application.

Add these lines to the MainActivity.kt/.java or any other Activity file.

  • Kotlin

val data: Uri? = this.intent.data
if (data != null && data.isHierarchical()) {
val uri = this.intent.dataString
Log.i("MyApp", "Deep link clicked $uri")
}

  • Java

Uri data = this.getIntent().getData();
if (data != null && data.isHierarchical()) {
String uri = this.getIntent().getDataString();
Log.i("MyApp", "Deep link clicked " + uri);
}

shortio-deep-links

5. Run the emulator and follow the link you've specified in the AndroidManifest.

In our case the link is: https://shortcm.xyz/myapplication

If the link doesn't exist, you will get an error message. Send a link via email to click it via emulator. You'll be offered to open the short link via a browser, or your app.

shortio-deep-links

Try Short.io Deep links

Get Started for free

What did you learn?

  • android deep links
  • android app links
  • how to set up android link
  • how to configure short deep links on android

Inspired by:

Join the conversation

Great! Next, complete checkout for full access to Short.io Blog.
Welcome back! You've successfully signed in.
You've successfully subscribed to Short.io Blog.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.