Hello fellow Ionites.
I’m using Deeplinks plugin in Android trying to trigger the app with customer URL scheme.
I manage to trigger my app and capture the intent, but I always trigger the ‘no match’ function in deeplinks.route().subscribe().
Can someone help and see if I made a mistake?
More details:
My config.xml
...
<plugin name="ionic-plugin-deeplinks" spec="^1.0.15">
<variable name="URL_SCHEME" value="myapp" />
<variable name="DEEPLINK_SCHEME" value="https" />
<variable name="DEEPLINK_HOST" value="my.web.server" />
...
Note: I intend to capture also Universal Links in iOS that’s why I include deeplink_scheme and deeplink_host. But I use URL_SCHEME for android in order to support Android 5.x and before.
My app.component.ts:
let routes={
'/mylink': MyPage
};
deeplinks.route({routes})
.subscribe(
(match)=>{ this.onDeepLinkMatch(match) },
(nomatch)=>{ this.onDeepLinkNoMatch(nomatch) }
);
And when I try the emulator command:
adb shell am start -a android.intent.action.VIEW -d "myapp://app/mylink" com.domain.myapp
It’s always triggered the onDeepLinkNoMatch() function.
Any idea on what am I doing wrong, or how should I set my path in routes
object?