App listener appUrlOpen does it work in Andoid?

Hi guys,
do you know if there are some issue with capacitor appurlOpen and Android?
becasue if I try something like:

 App.addListener("appUrlOpen", (e) => {
        slug.value = e.url.split(".come").pop();
        if (slug.value.includes("/tabs/cart")) {
          ionRouter.push({ name: "user-orders" });
        }
        if (slug.value.includes("/tabs/user")) {
          ionRouter.push({ name: "user-orders" });
        }

        Browser.close();
      });

in IOS I’ve no problem but in Android it open the url in the browser instead of close the capacitor browser and show the right view.

Dido you have any advice ?

Thanks and kind regards,

Davide

I think you need to change
slug.value = e.url.split(“.come”).pop();
to this
slug.value = e.url.split(“.com”).pop();

1 Like

If the typo isn’t the issue, open your app settings on Android and check “Open by default” to see if the proper link is listed and enabled, that should point you in the right direction. Console logs + ://inspect on a device are a good way to see what’s going on.