
July 30, 2021 • Business, Knowledge
January 22, 2025 • Business, Mobile App, Knowledge • by Wahyu Untoro
Table of Contents
Have you ever clicked on a link that directly opened an app installed on your device? This common occurrence in platforms like e-commerce is made possible through smart linking technologies. Here are several reasons why deeplink and applink integration is highly beneficial:
Deeplinks protect users from scam threats by ensuring links cannot redirect to risky third-party apps, thus reducing the potential for malware attacks.
When users click on a specific product link, the app opens directly to the product page (if installed). If the app isn’t installed, users are still directed to the same page on the web version.
Deeplinks allow smooth transitions between apps and the web, creating a hassle-free user experience and improving user retention.
With deeplinks, users can share links directly to specific pages. Without deeplinks, recipients would need to manually search for the page in the app.
Understanding key terms in this technology:
timedoor.net
.app:timedoor.net
.While deeplinks are effective for many cases, applinks are more suitable in certain scenarios:
If a website uses URLs like example.com/product_example
for products and example.com/post
for articles, apps might struggle to determine the appropriate page to open. Applinks help direct links explicitly to the app.
Imagine you are using an app and you click on a link like “Privacy Policy” that should be opened within the app itself (via WebView). However, there is an issue: the link automatically triggers a deeplink designed to open the main application.
As a result, the WebView in the app opens.
The WebView triggers the deeplink to open the main app. The main app opens again to the WebView. This cycle continues (WebView > app > WebView > app), causing an endless loop.
The outcome? The app hangs or even the device slows down due to excessive memory usage.
Solution with Applink: To overcome this, applinks can be used to ensure certain links (such as the privacy policy or other pages) remain within the WebView without triggering an endless loop. With applinks, the app will know when to open links in the WebView and when to open the main app.
To add deeplinks or applinks, modify the AndroidManifest.xml
file with the following code:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
<data android:host="yourdomain.com" /> <!-- Replace with your domain -->
</intent-filter>
On the server, add an assetlinks.json
file in the .well-known
directory:
[
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.application.id", <!-- Replace with application ID -->
"sha256_cert_fingerprints": [
"10:9B:4B:1E:DC:E7:ED:92:5A:2B:41:E6:CA:1B:9B:DE:63:B2:08:58:1C:F4:8D:D8:25:F4:9D:CD:5E:4D:BE:48" <!-- Replace with app fingerprint -->
]
}
}
]
Validate with the following command:
adb shell am start -a android.intent.action.VIEW \
-c android.intent.category.BROWSABLE \
-d https://yourdomain.com
For iOS, add your domain in Signing & Capabilities:
+ Capability > Associated Domains
.
Then add the following entry in info.plist
:
<key>CFBundleURLName</key>
<string>yourdomain.com</string> <!-- Replace with your domain -->
<key>CFBundleURLSchemes</key>
<array>
<string>https</string>
</array>
On the server, add an apple-app-site-association
file in the .well-known
directory:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "teamId.com.application.id", <!-- Replace with {team id}.{bundle id} -->
"paths": ["/page1", "/page2"] <!-- Add pages that can open the app -->
}
]
}
}
To verify, access:
https://app-site-association.cdn-apple.com/a/v1/yourDomain.com
Integrating deeplinks and applinks significantly improves user experience by ensuring smooth transitions between apps and the web, enhancing user satisfaction and security. Have you tried implementing this technology yet?
If you want to learn more about how Timedoor Indonesia can help you implement these technologies, feel free to reach out to us for a consultation. Our team of experts is ready to assist you in creating seamless and efficient user experiences.
some other blog posts you might be interested in