3
I’m starting with Phonegap, and I found a problem: my app would need to open a Facebook page. But I can’t get the Phonegap App to open a simple Globo.com page (example), but through the Desktop I can normally!
index.html:
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Security-Policy" content="default-src *; script-src *; object-src *; style-src *; img-src *; media-src *; frame-src *; font-src *; connect-src *">    
        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
        <link rel="stylesheet" type="text/css" href="css/index.css">
        <title>Hello World</title>
    </head>
    <body>
    <br><br>
        <a href="www.globo.com">GLOBO</a>
        <iframe src="www.google.com/"></iframe>
        <script type="text/javascript" src="cordova.js"></script>
        <script type="text/javascript" src="js/index.js"></script>
        <script>
        </script>
    </body>
</html>
My config.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.example.hello" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>HelloWorld</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="[email protected]" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <access origin="*" />
    <allow-navigation href="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
</widget>
Can someone help me solve this situation?
Solved! The problem I believe is in the Phonegap App, because the Android apk worked normally!
It wouldn’t be because the
http://at the beginning of the URL? When you usehref="www.coisa.com"he will go tophonegap/www.coisa.com, EXAMPLE, instead of going tohttp://www.coisa.com, which is the website.– Inkeliz
Yes, I’ve tried it too and it doesn’t work. The <a> I was able to change and make it work with Jquery. $("#face"). click(Function() { window.open("https://www.facebook.com/xxxx/", "_system"); });
– Guilherme Lirio