App Link
Introduction
This document will address App Link in Flutter application development.
App Link
App Links is a feature introduced in Android 6.0 that allows apps to define their own domain name and serve as the default handler for multiple links. App Links is similar to deep linking, but with a standardized implementation.
Implementing App Links within your Flutter app can provide a seamless experience for users when they click on links that go to your app. By utilizing App Links, you can ensure that your app becomes the default handler for some links, so that users can open your app directly instead of opening a web browser.
To implement app linking within your Flutter app, use go_router. go_router is a powerful package that makes it easy to handle routing and navigation within your Flutter app. With go_router, you can create custom routes, handle deep links, and easily move between pages in your app.
How to
The configurations handled by DevOps
The continue implementation by make sure the go_router is having the same path as arkademi.com (web).
- Android
- IOS
Configuration
Add following file to the server, you can ask the DevOps to help.
[
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.arkademi.com",
"sha256_cert_fingerprints": [
"C2:7E:81:E7:47:49:F8:0D:8E:55:7B:F8:8B:4D:44:2F:B3:FB:A3:C9:B5:52:F5:33:29:E7:74:25:95:59:11:26"
]
}
},
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.arkademi.app",
"sha256_cert_fingerprints": [
"C2:7E:81:E7:47:49:F8:0D:8E:55:7B:F8:8B:4D:44:2F:B3:FB:A3:C9:B5:52:F5:33:29:E7:74:25:95:59:11:26"
]
}
}
]
Add The Intent Filter
This filter tells the Android system which links your app should handle, add the following code to the AndroidManifest.xml file:
<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:scheme="https" />
<data android:host="arkademi.com" />
<data android:host="prakerja.arkademi.com" />
</intent-filter>
Configuration
Add following file to the server, you can ask the DevOps to help.
{
"applinks": {
"apps": [],
"details": [
{
"appID": "MPA24GY6P7.app.arkademi.ios",
"paths": ["*"]
}
]
}
}
Add The Intent Filter
This filter tells the IOS system which links your app should handle, add the following code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:go.arkd.me</string>
<string>activitycontinuation:go.arkd.me</string>
<string>applinks:arkademi.com</string>
<string>applinks:prakerja.arkademi.com</string>
</array>
</dict>
</plist>