Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android app links have been verified. But, still disambiguation dialog shows up

Tags:

android

When I click on the link: https://example.com/abcd on android version 6/7/8 it shows disambiguation dialog. We have already verified domain by placing json at: https://example.com/.well-known/assetlinks.json. I've done everything as per the documentation and still the link doesn't open without disambiguation. Please help me find what I'm missing.

Code in manifest:

<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:pathPattern="/abcd"
    />
</intent-filter>
like image 744
Tejas B Avatar asked Dec 18 '18 07:12

Tejas B


People also ask

What is disambiguation dialog?

The disambiguation dialog is basically a dialog which appears when user's click on the link which is for your app and after that it will asked in which app you want to open the link just like the below screenshot. Image Source From: https://developer.android.com/training/app-links/verify-site-associations.

How do I know if deeplink is working?

By using Android Debug Bridge (ADB) shell commands one can test the deep link flow. It is used to verify if the link navigates to the correct section of your app. This command starts the ADB shell with the VIEW action and specifies the deep link URL to be tested.


3 Answers

Late to the party but I too experienced the disambiguation always popping up. For those who haven't managed to resolve this yet (or to come), go to Logcat and search for "IntentFilterIntentOp". You should be seeing something like Verification 8 complete. Success:true. Failed hosts:. This may fail (Verifying IntentFilter. verificationId:8 scheme:"https" hosts:"example.co.za" package:"za.co.example.qa".) if you've uploaded your assetlinks.json file to one domain whilst it's not accessible on other or subdomains that you've registered in your intent-filter.

It's also worth mentioning that your App would have to have been launched at least once before in order for "IntentFilterIntentOp" to perform the necessary verification. Accessing a link via App Link Testing in Android Studio should thereafter automatically open your app without the disambiguation dialog.

like image 147
Eesa Jacobs Avatar answered Oct 24 '22 02:10

Eesa Jacobs


update as of 2021 with Android 12:

Android changed web intent resolution policy that effects link handling, if you follow all the new requirements your app will be given a chance if not browser will handle those, more on this here: web intent resolution requirements

/////////////////////Below behavior might still apply today//////////////////////

The Caveat here is if you install the app through playstore the default "link-handling policy" of the application with registered domains like www.example.com is set to "Handle in the app", which will open the app directly subject to intent filter verification without any disambiguation dialogues.

If you install the app by means other than playstore like through adb even though you sign it with keystore the default link handling policy is set to "Always ask" which will show disambiguation dialog even though the intent-filter verification passes for your app link.

like image 29
KingKongCoder Avatar answered Oct 24 '22 00:10

KingKongCoder


Please try to add autoVerify="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="https"
        android:host="example.com"
        android:pathPattern="/abcd"
    />

like image 1
Doni Avatar answered Oct 24 '22 00:10

Doni