Flutter android deep links is not working

97 views Asked by At

I am currently implementing the deep linking feature. I have followed Flutter official documentation but it is not working for me. Here is my assetlinks.json file which is hosted on Firebase

[{
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
      "namespace": "android_app",
      "package_name": "com.myname.appname",
      "sha256_cert_fingerprints":
      ["sha256_from_google_app_signing_cert"]
    }
  }]

and here is my Android manifest file

 <!-- deep linking -->
            <!-- <meta-data android:name="flutter_deeplinking_enabled" android:value="true" /> -->
            <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="http" />
                <data android:scheme="https" />
                <data android:host="app.mydomain.online" />

            </intent-filter>

flutter_deeplinking_enabled is commented because it is mentioned in the documentation as I am using the applinks package.

and here is my firebase.json file

{
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ]
  },
  "appAssociation": "NONE"
}

I tried to access the file through a browser and it worked but I am not sure what I have done wrong so the app is not being opened automatically.

Your help is appreciated!

1

There are 1 answers

3
Siddarth Jain On

[{
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target": {
      "namespace": "android_app",
      "package_name": "com.myname.appname",
      "sha256_cert_fingerprints":
      ["sha256_from_google_app_signing_cert"]
    }
  }]

This should be hosted on -> yourdomainname.com/.well-known/assetlinks.json

Not on firebase