androidandroid-studiomanifestdeep-linkingandroid-app-links

Android applink disambiguation dialog when multiple domain declared


Hi I'm trying to include the app-links as described here: https://developer.android.com/training/app-links

Everything works fine with a single domain, but when I try to include multiple domains Android's system always shows the disambiguation dialog.

Is there any workaround to include multiple domains (not SUBdomains), in my manifest file avoiding to show disambiguation dialog?

Here my AndroidManifest.xml

<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleInstance" android:name="MainActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="adjustResize">
  <intent-filter android:label="@string/launcher_name">
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
  </intent-filter>
  <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:host="exampl1.it" android:scheme="http" android:path="/applink"/>
  </intent-filter>
  <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:host="example1.it" android:scheme="https" android:path="/applink"/>
  </intent-filter>
  <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:host="p.example2.it" android:scheme="http"/>
  </intent-filter>
  <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:host="p.example2.it" android:scheme="https"/>
  </intent-filter>
  <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:host="example3.com" android:scheme="http" android:path="/path/to-deep"/>
  </intent-filter>
  <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:host="example3.com" android:scheme="https" android:path="/path/to-deep"/>
  </intent-filter>
</activity>

Solution

  • See my answer at https://stackoverflow.com/a/60342565/2914140. I divided all <data> tags into attributes:

    <data android:scheme="https" />
    <data android:host="example.com" />