I'm developing an Android app that needs a deep link with an NFC tag.
Here you can see my intent filter for the activity:
<activity
android:name=".ui.schedule.ScheduleActivity"
android:parentActivityName=".ui.home.HomeActivity">
<intent-filter android:label="testDeepLink">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:scheme="http"
android:host="www.testdeeplink.com"
android:pathPrefix="/schedule"/>
</intent-filter>
</activity>
Now when I start this command in adb the application starts with the correct activity (ScheduleActivity):
adb shell am start -W -a android.intent.action.VIEW -d "http://www.testdeeplink.com/schedule?stop_id=1" com.exmemple.android
But when I encode the URL on an NFC tag, scanning that tag just starts the web browser of my phone. What am I missing to start the activity with the NFC tag?
URL encoded on the tag: "http://www.testdeeplink.com/schedule?stop_id=1"