Access external URL (Google. Com) from phonegap (Android)
                                        
                    •
                    Android                                    
                I'm new to phonegap and Android. I can't access the external URL. Like Google from phonegap, I tried iframe and window.location.href, but I don't know why it doesn't work
<!DOCTYPE HTML>
<html>
<head>
<title>PhoneGap</title>
<script type="text/javascript" charset="utf-8" src="phonegap-0.9.3.js"></script>
<link rel="stylesheet" href="jquery.mobile-1.0a1.min.css" /> 
<script src="jquery-1.4.3.min.js"></script> 
<script src="jquery.mobile-1.0a1.min.js"></script>
</head>
<body>
<iframe src="http://www.google.com"></iframe> 
</body>
</html>
resolvent:
Have you added an external URL to the whitelist? There is a file named phonegap.xml in / RES / XML in the project
Here is an example of my phonegap.xml file:
<?xml version="1.0" encoding="utf-8"?>
<phonegap>
    <access origin="http://127.0.0.1*"/>
    <access origin="http://devgeeks.org"/>
    <access origin="http://*.phonegap.com"/>
    <log level="DEBUG"/>
</phonegap>
                
                            The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
                        
                                            
                        THE END
                    
                    
                    
                                                        二维码
                        
                        
                                                
                        