I've started a new project in Android Studio and added this to my androidmanifest.xml
:
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</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"/>
</intent-filter>
</activity>
Then I went to Google Chrome and typed in: http://www.example.com/gizmos
. The App doesn't open. And then tried command line:
mac-van-jim:DeeplinkTest jimclermonts$ adb shell am start -n eu.theappfactory.deeplinktest/MainActivity
Starting: Intent { cmp=eu.theappfactory.deeplinktest/MainActivity }
Error type 3
Error: Activity class {eu.theappfactory.deeplinktest/MainActivity} does not exist.
And this one:
mac-van-jim:DeeplinkTest jimclermonts$ adb shell am start -W -a android.intent.action.VIEW -d "http://www.example.com" eu.theappfactory
Starting: Intent { act=android.intent.action.VIEW dat=http://www.example.com/... pkg=eu.theappfactory }
Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=http://www.example.com/... flg=0x10000000 pkg=eu.theappfactory }
I've tried these threads:
Deep Link does not work on Android
Android deep linking is not working
Deep-linking intent does not work
Nothing is working? I can remember this used to work? Maybe it's because of the new Android App Links?
EDIT: I figured out that it doesn't work in Chrome (anymore) but when creating and uploading a webpage, it also doesn't work:
<!DOCTYPE html>
<html>
<head>
<body>
<a href="Click here" target="_blank">http://www.example.com/gizmos</a>
</body>
</head>
</html>