[HACK] Open window.location, top.location and target=’_blank’ links in WebView on Android

You realized it, standard HTML links in your Android WebView app templates do work by default, and the WebView opens them in the WebView (which is great!), but website links of some types do NOT work (nothing will happen, or the WebView will open it full-screen instead of loading it in Android system browser). Especially, these types of links can be hard to open when it comes to Android WebView apps:

– window.location (JavaScript)
– window.location.href (JavaScript)
– top.location (JavaScript)
– top.location.href (JavaScript)
– target=”_blank” links (HTML)

You need to have all kinds of links working correctly and as expected? Great, our IT guys and girls worked hard on some hacks: In the final, the WebViewGold app template allows opening all kinds of links.

So here you go:

  • Download the WebViewGold template for Android Studio here.
    or book our full all-inclusive WeSetupYourWebViewApp service.
  • Afterward, just link to any kind of web address based on any linking method desired.