Assuming that I called a webpage using a Flutter webview plugin. The webpage code are as follows :
<button onclick="window.open('https://api.whatsapp.com/send?phone=60175XXXX','_system');"><i class="fa fa-whatsapp"></i> Whatsapp</button>
When I clicked on the button, it redirects to ERR_UNKNOWN_URL_SCHEME because the link pointed to whatsapp:// , not https:// .
I am trying not to adjust the Flutter code, by not following the Android WebView err_unknown_url_scheme . I just want to use Javascript inside the webpage to open the mobile browser.
Already tried to use '_blank' or target='_system', but it doesn't work.
"window.open('https://api.whatsapp.com/send?phone=60175XXXX','_blank');"
<a href="https://www.google.com/" target='_system'>...</a>
Any helps? Thank you.
My question might be similar with this one, but the answer doesn't help much. How to open a window(poup) on mobile browser from inside a webview using javascript?