Closed eljass closed 6 months ago
It does did you tried your fix? if yes please open a PR and i merge it
Not yet, can do so soon though. For now we had another possible workaround for it with capacitor's app-launcher plugin. In this workaround we attach listener for urlChanged event in here and if the schema is something else than http
or https
we try to open another app with that URL by:
addListener("urlChangeEvent", handleUrlChange)
handleUrlChange
, check if URL can be opened: canOpenUrl(options: CanOpenURLOptions) => PromiseAlthough might be good to attach this deepLink handler directly into this plugin so I'll try that!
Thanks it's merged
Currently if inside the webview links redirects to the deeplinked addresses the page does not load because URL is invalid (URL schema is not
http://
orhttps://
). So we are experiencing this sort of issues:Would it be possible to adjust WebView configs to open external application in these cases rather than trying to load the URL inside the WebView itself?
I assume the fix lies inside these lines: https://github.com/Cap-go/capacitor-inappbrowser/blob/f7962d27b2a7acc5ba9827d969f61abe7857af32/android/src/main/java/ee/forgr/capacitor_inappbrowser/WebViewDialog.java#L314C1-L321C1
So instead of this:
function could look something like this:
Does this make sense?