3

I have a deeplink with query parameter. When I click on the deeplink its not showing me my app in the dialog, all its showing browser app. By any chance do we need to add anything in assetslinks.json to support query parameter? Please suggest me what could be the issue.

My deeplink URL: myCustomScheme://myHost?type=xxx

Android
  • 1,420
  • 4
  • 13
  • 23
user448250
  • 1,614
  • 2
  • 13
  • 15
  • 1
    Did you get your deep link working with query parameters? The current answer doesn't acknowledge the URL with query parameters. – Shubham AgaRwal Nov 04 '19 at 06:10

2 Answers2

0

For deep linking, use intent filters described in the Launcher activity to get the parameters described in the link. You can have more than one data tags in an intent-filter. One such example is given below:

<activity
    android:name=".views.activity.SplashActivity"
    android:configChanges="orientation"
    android:label="@string/app_name"
    android:screenOrientation="portrait"
    android:launchMode="singleTask"
    android:theme="@style/ColdStart">
    <intent-filter>
        <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="your host here"
            android:scheme="https" />


    </intent-filter>


</activity>
Abdullah Riaz
  • 536
  • 5
  • 19
0

Given your deep-link URL is something like this: https://www.domain123.com/xxxx.aspx?type=xxx

Try this setup in your AndroidManifest.xml:

<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" />
    <data android:host="www.domain123.com" />
    <data android:pathPrefix="/xxxx.aspx" />


</intent-filter>

Note that there is no place for query parameter definition in AndroidManifest.xml.

straya
  • 5,002
  • 1
  • 28
  • 35