i searched a lot and i read many answers but unfortunately i didn't manage to make it work.
I am testing deep link on my app and i can not make custom scheme url work on click.
My Manifest code is :
<activity android:name=".ui.activities.home.HomeActivity"
android:exported="true"
android:launchMode="singleTask">
<!-- for http links -->
<intent-filter android:label="testHttpDeepLink">
<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 "http://www.myapp.com/test” -->
<data android:scheme="http"
android:host="www.myapp.com"
android:pathPrefix="/test" />
</intent-filter>
<!-- for app links -->
<intent-filter
android:label="testAppDeepLink">
<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 "myapp" -->
<data android:scheme="myapp"
android:host="*"/>
</activity>
When i am trying to test it on studio terminal the second format works fine. So if i write
adb shell am start -a android.intent.action.VIEW -d "myapp://test"
app home activity opens correct. But when i try to open it from a link it does not work. For example i send an email to myself with possible formats, for example
1 -> www.myapp.com/test
2 -> myapp://test
The first works fine but the second not. It shows message error: net::ERR_UNKNOWN_URL_SCHEME
when i click to the url. Only if i press long click and select open then drives me to app home activity.