title: Gelocation not working in Android - PhoneGap Build
body: <p>I am making an simple PhoneGap app which gets the users location.</p>
  
  <p>the code used for my build is from examples of the maps <a href="https://developers.google.com/maps/documentation/javascript/examples/map-geolocation" rel="nofollow noreferrer">documentation</a></p>
  
  <p><strong>Following is my xml code:</strong></p>
  
  <pre><code>&lt;content src="index.html" /&gt;
  &lt;preference name="DisallowOverscroll" value="true" /&gt;
  &lt;preference name="android-minSdkVersion" value="14" /&gt;
  &lt;preference name="StatusBarOverlaysWebView" value="false" /&gt;
  &lt;preference name="StatusBarBackgroundColor" value="#ee6e73" /&gt;
  &lt;preference name="StatusBarStyle" value="blacktranslucent" /&gt;
  &lt;preference name="orientation" value="portrait" /&gt;
  &lt;plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.3" /&gt;
  &lt;plugin name="cordova-plugin-geolocation" source="npm" /&gt;
  &lt;plugin name="org.apache.cordova.globalization" source="npm" /&gt;
  &lt;plugin name="org.apache.cordova.geolocation" source="npm" /&gt;
  &lt;plugin name="cordova-plugin-console" source="npm" spec="~1.0.3" /&gt;
  &lt;plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.1" /&gt;
  &lt;plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" /&gt;
  
  &lt;feature name="Geolocation"&gt;
  &lt;param name="android-package" value="org.apache.cordova.geolocation.GeoBroker" /&gt;
  &lt;/feature&gt;
  &lt;allow-navigation href="*" /&gt;
  &lt;access origin="*" launch-external="yes" /&gt;
  &lt;access origin="*://*.googleapis.com/*" subdomains="true" /&gt;
  &lt;access origin="*://*.gstatic.com/*" subdomains="true" /&gt;
  &lt;access origin="*://*.google.com/*" subdomains="true" /&gt;
  &lt;access origin="*://*.googleusercontent.com/*" subdomains="true" /&gt;
  &lt;allow-intent href="http://*/*" /&gt;
  &lt;allow-intent href="https://*/*" /&gt;
  &lt;allow-intent href="tel:*" /&gt;
  &lt;allow-intent href="sms:*" /&gt;
  &lt;allow-intent href="mailto:*" /&gt;
  &lt;allow-intent href="geo:*" /&gt;
  &lt;platform name="android"&gt;
  &lt;allow-intent href="market:*" /&gt;
  &lt;/platform&gt;
  &lt;platform name="ios"&gt;
  &lt;allow-intent href="itms:*" /&gt;
  &lt;allow-intent href="itms-apps:*" /&gt;
  &lt;/platform&gt;
  </code></pre>
  
  <p>While the app works perfectly on the browser, the android version does not load the location.</p>
  
  <p>Further noticed that maps.gstatic.com and mts.googleapis.com is not loading from the app, both are loaded in the browser which then results in providing the location</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>UPDATE 1:</strong></p>
  
  <p>to avoid  confusions, I have used the default config.xml generated by phonegap desktop app, still the location is not obtained. </p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;widget id="com.phonegap.helloworld" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"&gt;
  &lt;name&gt;new&lt;/name&gt;
  &lt;description&gt;
  Hello World sample application that responds to the deviceready event.
  &lt;/description&gt;
  &lt;author email="support@phonegap.com" href="http://phonegap.com"&gt;
      PhoneGap Team
  &lt;/author&gt;
  &lt;content src="index.html" /&gt;
  &lt;preference name="DisallowOverscroll" value="true" /&gt;
  &lt;preference name="android-minSdkVersion" value="14" /&gt;
  &lt;plugin name="cordova-plugin-battery-status" source="npm" spec="~1.1.1" /&gt;
  &lt;plugin name="cordova-plugin-camera" source="npm" spec="~2.1.1" /&gt;
  &lt;plugin name="cordova-plugin-media-capture" source="npm" spec="~1.2.0" /&gt;
  &lt;plugin name="cordova-plugin-console" source="npm" spec="~1.0.2" /&gt;
  &lt;plugin name="cordova-plugin-contacts" source="npm" spec="~2.0.1" /&gt;
  &lt;plugin name="cordova-plugin-device" source="npm" spec="~1.1.1" /&gt;
  &lt;plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0" /&gt;
  &lt;plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2" /&gt;
  &lt;plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.0" /&gt;
  &lt;plugin name="cordova-plugin-file" source="npm" spec="~4.1.1" /&gt;
  &lt;plugin name="cordova-plugin-file-transfer" source="npm" spec="~1.5.0" /&gt;
  &lt;plugin name="cordova-plugin-geolocation" source="npm" spec="~2.1.0" /&gt;
  &lt;plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.3" /&gt;
  &lt;plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.3.0" /&gt;
  &lt;plugin name="cordova-plugin-media" source="npm" spec="~2.2.0" /&gt;
  &lt;plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0" /&gt;
  &lt;plugin name="cordova-plugin-splashscreen" source="npm" spec="~3.2.1" /&gt;
  &lt;plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2" /&gt;
  &lt;plugin name="cordova-plugin-vibration" source="npm" spec="~2.1.0" /&gt;
  &lt;plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" /&gt;
  
  &lt;access origin="*" /&gt;
  &lt;allow-intent href="http://*/*" /&gt;
  &lt;allow-intent href="https://*/*" /&gt;
  &lt;allow-intent href="tel:*" /&gt;
  &lt;allow-intent href="sms:*" /&gt;
  &lt;allow-intent href="mailto:*" /&gt;
  &lt;allow-intent href="geo:*" /&gt;
  &lt;platform name="android"&gt;
      &lt;allow-intent href="market:*" /&gt;
  &lt;/platform&gt;
  &lt;platform name="ios"&gt;
      &lt;allow-intent href="itms:*" /&gt;
      &lt;allow-intent href="itms-apps:*" /&gt;
  &lt;/platform&gt;
  </code></pre>
  
  <p></p>