Access external URL(Google.com) from PhoneGap(Android)

前端 未结 3 572
一向
一向 2021-01-14 20:32

I am new to PhoneGap and Android.I am unable to access Extrenal URL\' like google from PhoneGap,i tried Iframe and Window.Location.Href but not sure why it\'s not working.

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-14 20:50

    Opening an external link in phonegap / android is only possible two ways: Source: https://build.phonegap.com/blog/access-tags

    check blogpost of phonegap. They're explaining what the android default is, and what you can do about it.

    Follow the discussing on the phonegap forum: http://community.phonegap.com/nitobi/topics/make_links_use_external_broswer_consistently

    Edit:

    1. Add the following code to your config.xml.

       
      
    2. Add:

       function loadURL(url){ 
          navigator.app.loadUrl(url, { openExternal:true }); 
       } 
      
    3. Add:

       Url
      

提交回复
热议问题