0

Here is my intent filter for deep linking-

<intent-filter android:label="@string/app_name" android:autoVerify="true">
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <!-- Accepts URIs that begin with "https://example.com" or "https://www.example.com" -->
  <data android:scheme="https" android:host="www.example.com" />
  <data android:scheme="https" android:host="example.com" />
</intent-filter>

When I test it on Android lower version devices, clicking on links are showing the dialog to open the link in the respected app or in the browser but for Android 12 and 13 the links are always opening in the browser.

I created the assetlinks.json file as well and put it on this path-

https://www.example.com/.well-known/assetlinks.json

I noticed on the thing that when I manually select the "Supported web links", it always opens up in the app-

enter image description here

But it is not a feasible solution to ask users to manually do this. My problem is almost similar to this question and I tried the solution but it didn't work for me.

Can anyone please help with that?

Neha Soni
  • 3,935
  • 2
  • 10
  • 32

1 Answers1

1

it looks like your verification is failing. You should review the verification results by checking out the adb commands provided in the android docs : https://developer.android.com/training/app-links/verify-android-applinks#review-results

twoshar
  • 11
  • 1
  • Hey, thanks for the reply. Yes, I tested the commands, and the output is this- Domain verification state: example.com: 1024 www.example.com: 1024 – Neha Soni May 23 '23 at 12:27
  • You also need to have your assetlinks.json setup correctly. Can you confirm if the signature you got in the `adb shell pm get-app-links` is also present in your .well-known/assetlinks.json file – twoshar May 24 '23 at 13:28
  • Sorry for the delay in response. The deep linking is working fine. I was testing it in a wrong way. The assetlinks.json file contains a hash, so I prepared a signed release APK and then tested it, and it worked fine. Thanks for the response. – Neha Soni May 30 '23 at 04:38