Cordova Configure WebView to open external links

Source: Internet
Author: User

First, the problem: in the Android app using Cordova generated by default, WebView in the hyperlink, if not a relative link, will be opened by default with the browser.


Solution: Modify the Config. metabase file to add a link configuration node

  <!--configuration WebView can open external links--
  <allow-navigation href= "http://*/*"/>


In this case, clicking on the link in the page, without specifying target, can be opened in the current webview.

<!--specify default to use WebView open-
<a href= "http://www.qq.com" >QQ home </a>


Attention:

1. For a page that is already open through the browser in the current app, click again or the browser will open.

2. Open the page this way, no progress bar is displayed by default.


More:

Ionic related finishing

Cordova page Load External screen picture failed, refused to load the image

vs2015 generate Cordova Page Chinese garbled

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.