I used this video to implement Deeplink for Android using Capacitor. I have added assetlinks.json in this url. I tested it and it was fine. I generated the apk and signed it using my keystore. But when I click the url from Whatsapp to it only opens in Chrome browser. Below are my code snippets used:
type or paste code here
// app.component.ts
deeplinks(){
App.addListener('appUrlOpen', (event: URLOpenListenerEvent) => {
this.zone.run(() => {
console.log('SAM: deepLinks event.url: ',event.url)
const path = 'nl.intuceo.com:8100/login'
if (event.url.includes(path)) {
this.router.navigateByUrl('splash');
}
});
});
}
// AndroidManifest.xml
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="nl.intuceo.com:8100" />
</intent-filter>