Cap-go / capacitor-inappbrowser

Capacitor plugin in app browser with urlChangeEvent
MIT License
66 stars 48 forks source link

Listener or Option to check current page URL #55

Closed bhekor closed 7 months ago

bhekor commented 1 year ago

Please can you add a listener to check the current page URL and perform a function like closing the browser etc?

In the case where someone needs to perform an action on the action web and when done close the browser automatically instead of waiting for the user to close the page manually.

Thanks in advance.

riderx commented 1 year ago

Hey you already have this with addListener('urlChangeEvent', ...) and the close method :)

bhekor commented 1 year ago

They don't seem to be working on my Android (Nokia 7plus)

mohanmuthusamy commented 1 year ago

@bhekor, the event listener will work only on openWebView, but I tried the event is triggering, but when I close the browser, it closes the entire app and show an error in the console Caused by: java.lang.Throwable: A WebView method was called on thread 'CapacitorPlugins'. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 2) {b5b07c7} called on Looper (CapacitorPlugins, tid 91) {153e440}, FYI main Looper is Looper (main, tid 2) {b5b07c7})

riderx commented 12 months ago

the close issue was something different, i just made a fix for it ! @bhekor what method do you use to open ''openWebView'' ? Because the open one don't have the event

adele2014 commented 8 months ago

Thanks for this plugin @riderx . I have a similar issue on Android. The urlChangeEvent is not listening to a url redirect even when using openWebView. What can I do.

GuillaumeUnice commented 8 months ago

Same issue on my side

riderx commented 8 months ago

Do you use the last version of the plugin ? Can any of you provide a reproduction repo ? It is used in one of the app I do freelance for

GuillaumeUnice commented 8 months ago

Ok with the last version and using openWebView it's working on my side