Skip to main content

App Link

Introduction

This document will address App Link in Flutter application development.

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

note

The configurations handled by DevOps

important!

The continue implementation by make sure the go_router is having the same path as arkademi.com (web).

Configuration

Add following file to the server, you can ask the DevOps to help.

https://arkademi.com/.well-known/assetlinks.json
[
{
"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:

..\android\app\src\main\AndroidManifest.xml
<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>

References

Deep Linking