Deeplinking launches app within the browser


#1

Hi there, I’ve been trying to launch the app from the browser with say myscheme://launch, I’ve followed instructions given on https://ionicframework.com/docs/native/deeplinks/, but it does not seem to work as expected, or am I missing something? I know this isnt how this should work because I have used this plugin with ionic v1 in the past, so, here’s a screenshot of what happens when I try to launch app from different browsers:

.
basically I just want the myscheme:// scheme opens up the Application within system instead of launching another one within the browser,
Here’s some code for you guys:

.xml:

        <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:scheme="myscheme" />
        </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:host="myscheme.com" android:pathPrefix="/" android:scheme="https" />
            <data android:host=" " android:pathPrefix="/" android:scheme=" " />
            <data android:host=" " android:pathPrefix="/" android:scheme=" " />
            <data android:host=" " android:pathPrefix="/" android:scheme=" " />
            <data android:host=" " android:pathPrefix="/" android:scheme=" " />
        </intent-filter>

app.component.ts:

  this.deeplinks.route({
    '/en/invoices/:state/:invoiceId/:invoiceSecret?order_id=81': HomePage
  }).subscribe((match) => {
    // match.$route - the route we matched, which is the matched entry from the arguments to route()
    // match.$args - the args passed in the link
    // match.$link - the full link data
    toast.show('Successfully matched route'+ match, '5000', 'bottom').subscribe(toast => {});
  },
  (nomatch) => {
    // nomatch.$link - the full link data
    toast.show('Got a deeplink that didn\'t match'+ nomatch, '5000', 'bottom').subscribe(toast => {});
  });

all three applications shown in the screenshot works exactly as it should and when I close the app from the exit button inside, it just goes back to the website where the myscheme://launch hyperlink were clicked.

any sort of help would be highly appreciated and thanks in advance.


#2

Really stuck here, anyone ?