1

I am working on my applinking, and everything works fine on Android version 11, but doesn't work on version 12 or above!

Btw, I am using Firebase Hosting for my Website!

And lately, I've found that my domain ownership is not verified on Google Play Console (GPC). I did copy all the codes from GPC -> Setup -> App Signing and configure them into my website assetlinks.json. Yet, my app isn't getting verified, I did everything I could, but still, the issue remains unmoved.

  1. public/.well-known/assetlinks.json
[
  {
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target" : { 
      "namespace": "android_app", 
      "package_name": "com.(myDomain).(myapp)",      
      "sha256_cert_fingerprints": ["EE:C6:DF..."] 
    }
  },
  {
    "relation": ["delegate_permission/common.handle_all_urls"],
    "target" : { 
      "namespace": "android_app", 
      "package_name": "com.(mydomain).(myApp)",      
      "sha256_cert_fingerprints": ["A9:11:AA..."] 
    }
  }
]
  1. My Android Manifest
<intent-filter android:autoVerify="true" tools:targetApi="m">
  <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" android:host="(myDomain).com" android:pathPrefix="/view/"/>
</intent-filter>

My Website Firebase.json file:

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

Though my codes seem perfect, yet, I'm not sure if I'm missing something, but I'm definitely getting issues: My domain ownership not getting verified.

6
  • 1
    In which activity did you add the intent-filter?
    – ΓDΛ
    Apr 18 at 10:29
  • post complete Android Manifest
    – Maveňツ
    Apr 19 at 7:48
  • try to put all data intent-filter sections in separated lines: <data android:host="example.com" /> <data android:scheme="http" /> <data android:scheme="https" /> ps.: be sure that your assetlinks.json is something like example.com/.well-known/assetlinks.json 2 days ago
  • @RicardoAntônio, I did do that, but i didn't work. Actually my app can't verify my domain, because if i manual verify a domain for my app from app settings, it works fine!
    – Uraam Asif
    18 hours ago
  • @ΓDΛ, I have only 1, default, activity
    – Uraam Asif
    17 hours ago

1 Answer 1

0

Following the "Verify Android App Links", make sure your assetlinks.json file is correctly formatted and accessible via HTTPS without any redirection. The file needs to be at https://<your-domain>/.well-known/assetlinks.json. You mentioned that your domain is served through Firebase Hosting, so make sure the Firebase Hosting configuration does not block access to the .well-known directory.

+--------------------+       +-------------------------+        +----------------------+
| Google Play Console|  ---> | Firebase Hosting        |  --->  | Android App          |
| (Domain ownership) |       | (assetlinks.json)       |        | (Intent-filter setup)|
+--------------------+       +-------------------------+        +----------------------+

Your firebase.json could be:

{
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "/.well-known/assetlinks.json",
        "destination": "/public/.well-known/assetlinks.json"
      }
    ]
  }
}

That rewrite rule makes sure requests to .well-known/assetlinks.json are served from the correct location.

The intent-filter setup should include a domain that should match exactly what is specified in your assetlinks.json and it is targeted correctly in your Android app.

<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" android:host="example.com" android:pathPrefix="/view/"/>
</intent-filter>

Make sure you have followed all the steps required by Google Play Console to verify domain ownership. That typically involves adding a DNS record or uploading a specific file to your hosting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.