Add ability to open apps and browsers from TWA
Is your feature request related to a problem? Please describe.
Currently, all links open within TWA and intent:// links don't work.
Describe the solution you'd like Ability to through user outside TWA for all non-app related links. It would be awesome if there would be an option to let user select where they want to open a link, just like in a native app. Opening maps in a selected map application, social media link in an app I want, etc.
Additional context
It is possible to open links outside PWA from browsers and WebView. WebView even has a method shouldOverrideUrlLoading that lets developer decide how links should behave. CustomTabs doesn't seem to offer anything. An exception could be execCommand, but I am not an Android/Java developer, so don't understand what to do with it.
If there is at least some way to achieve this behaviour, please share it.
We achieved that using :
window.location.replace("deeplinkPattern://myDeeplink");
(deeplinkPattern is referenced in our AndroidManifest as a browsable intent-filter)
There may be privacy concerns regarding the intents and deep linking. However, for http/https URLs I wish there was a way to allowlist the URLs that we want "in-app" (within the TWA context) versus "go to default browser"