How to get browser url @capacitor/browser

Hi guys,
I would like to know if is possbile to get the current url of my inapp browser (@capacitor/browser) or trigger a redirect.

I would like to open a certain page if the url match and close the browser.

I use

 await Browser.open({ url });
    await Browser.addListener("browserPageLoaded", async () => {
      // Intercept an url and do logic
      await Browser.close();
    });

Thansk in advance and kind regards,

Davide

It’s not possible, the native components used in the plugin don’t provide that kind of information because of privacy.

Maybe you could try @capgo/inappbrowser plugin instead of @capacitor/browser.

You can get browser url by using addListener(‘urlChangeEvent’, …) method.

Hi @jonz94 !
I want to try it because if it works It will be awesome.

Onte thing:
dido you have experience with the plugin?
Basically I installed it in my package.json and I sync it.

After that there’s something else I must to do?
Because the docs did’t say If I must import Browser from the plugin or something about the usage.