title: Phonegap Android internet not working
body: <p>I am writing my first app in Phonegap and I have been testing it on an Android device. I believe I have granted the appropriate permission:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  </code></pre>
  
  <p>But the map is not showing up. I am trying to get a latitude and longitude from a web service and use this to put a flag on a Google map. I believe the issue is actually with the internet access, as if I run this through Visual Studio as a website, the service returns the coordinates and the map is displayed. However, when the app is compiled and that website is run inside the app webview the coordinates are not returned and no map is displayed.</p>
  
  <p>I also added a table to show the returned coordinates, again they are displayed in a browser but are blank in the running app. Does anyone have any idea why the webview wouldn't be able to connect to the internet and return the required data? I have removed the actual address of the web service but I know that is fine as it works in a browser.</p>
  
  <p>HTML page:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;amp;sensor=true"&gt;&lt;/script&gt;
      &lt;link rel="stylesheet" type="text/css" href="css/index.css" /&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div class="app2"&gt;
        &lt;div id="map" style="width: 200px; height: 150px"&gt;&lt;/div&gt;
        &lt;script type="text/javascript"&gt;
          var xmlhttp = new XMLHttpRequest();
          xmlhttp.open("GET", "http://www.xxxxxxxx.com/mobile/iphone/xml/postal.asp?postal=33173", false);
          xmlhttp.send();
          xmlDoc = xmlhttp.responseXML;
          var myOptions = {
            zoom: 10,
            mapTypeId: google.maps.MapTypeId.ROADMAP,
          };
          var map = new google.maps.Map(document.getElementById("map"), myOptions);
          var lat = x[i].getElementsByTagName("latitude")[0].childNodes[0].nodeValue;
          var long = x[i].getElementsByTagName("longitude")[0].childNodes[0].nodeValue;
          var pos = new google.maps.LatLng(lat, long);
          var infowindow = new google.maps.InfoWindow({
            map: map,
            position: pos,
            content: "Postcode 33173(Lat:" + lat + ", Long:" + long + ")"
          });
          map.setCenter(pos);
        &lt;/script&gt;
        &lt;script&gt;
          document.write("&lt;table border='1'&gt;");
          document.write("&lt;tr&gt;&lt;td&gt;Postcode&lt;/td&gt;&lt;td&gt;latitude&lt;/td&gt;&lt;td&gt;longitude&lt;/td&gt;&lt;/tr&gt;");
          var x = xmlDoc.getElementsByTagName("position");
          for (i = 0; i &lt; x.length; i++) {
            document.write("&lt;tr&gt;&lt;td&gt;33173&lt;/td&gt;&lt;td&gt;");
            document.write(x[i].getElementsByTagName("latitude")[0].childNodes[0].nodeValue);
            document.write("&lt;/td&gt;&lt;td&gt;");
            document.write(x[i].getElementsByTagName("longitude")[0].childNodes[0].nodeValue);
            document.write("&lt;/td&gt;&lt;/tr&gt;");
          }
          document.write("&lt;/table&gt;");
        &lt;/script&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Manifest:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="1.0.0" android:windowSoftInputMode="adjustPan" package="dig.phonegap.loa_app" xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /&gt;
    &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
    &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
    &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
    &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
    &lt;uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /&gt;
    &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
    &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
    &lt;uses-permission android:name="android.permission.RECEIVE_SMS" /&gt;
    &lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
    &lt;uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /&gt;
    &lt;uses-permission android:name="android.permission.READ_CONTACTS" /&gt;
    &lt;uses-permission android:name="android.permission.WRITE_CONTACTS" /&gt;
    &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
    &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
    &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
    &lt;uses-permission android:name="android.permission.BROADCAST_STICKY" /&gt;
    &lt;uses-sdk android:minSdkVersion="10" android:targetSdkVersion="18" /&gt;
    &lt;application android:allowBackup="false"
      android:hardwareAccelerated="true"
      android:icon="@drawable/icon"
      android:label="@string/app_name"&gt;
    &lt;activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
      android:label="@string/app_name"
      android:name="HelloWorld"
      android:theme="@android:style/Theme.Black.NoTitleBar"&gt;
    &lt;intent-filter&gt;
      &lt;action android:name="android.intent.action.MAIN" /&gt;
      &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
    &lt;/intent-filter&gt;
  &lt;/activity&gt;
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>