Trying to enable deep linking to android app, testing intent can't launch activity

Try skipping package param entirely. I had exactly same problem and it works.

adb shell am start -W -a android.intent.action.VIEW -d "example://gizmos"


Comment out the second data part from your Android Manifest. As per google documentation of deep link :

"Intent filters may only contain a single data element for a URI pattern. Create separate intent filters to capture additional URI patterns."


The problem is you have one intent filter for 2 types of deep links:

<activity
    android:name="app.myActivity"
    android:label="@string/app_name"
    android:screenOrientation="portrait">
    <intent-filter>
        <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 "example://gizmos”-->
        <data
            android:host="gizmos"
            android:scheme="example" />
    </intent-filter>
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data
            android:host="www.example.com"
            android:pathPrefix="/gizmos"
            android:scheme="http" />
        <!-- note that the leading "/" is required for pathPrefix-->                
    </intent-filter>
</activity>

And you will be able to use both on the ADB shell. Please see my full answer here