title: Error code 3 Timeout when i try to get geolocation using Cordova in platform Android
body: <p>index.js code:</p>
  
  <pre><code>// debug
  
  function d(s) {
      console.log(s);
      $("#status").text(s);
  }
  
  // geo
  
  function geoWin(pos) {
      d("geoWin(): "+pos.coords.latitude+", "+pos.coords.longitude+","+pos.coords.speed);
  }
  
  function geoFail(error) {
      d("geoFail(): "+error.code+": "+error.message);
  }
  
  function startGeoWatch() {
      d("startGeoWatch()");
      opt = {maximumAge: 0,timeout: 2000, enableHighAccuracy: true};
      watchGeo = navigator.geolocation.watchPosition(geoWin, geoFail, opt);
  }
  
  function stopGeoWatch() {
      d("stopGeoWatch()");
      navigator.geolocation.clearWatch(watchGeo);
  }
  
  // life cycle
  
  function onPause() {
      d("onPause()");
      stopGeoWatch();
  }
  
  function onResume() {
      d("onResume()");
      startGeoWatch();
  }
  
  // init
  
  function onDeviceReady() {
      d("onDeviceReady()");
      document.addEventListener("pause", onPause, false);
      document.addEventListener("resume", onResume, false);
      startGeoWatch();
  }
  
  function main() {
      document.addEventListener('deviceready', onDeviceReady, false);
  }
  
  // main &amp; globals
  var watchGeo=null;
  main();
  </code></pre>
  
  <p>my config.xml Code :</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;widget id="com.terokarvinen.geo" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
      &lt;name&gt;HelloCordova&lt;/name&gt;
      &lt;description&gt;
          A sample Apache Cordova application that responds to the deviceready event.
      &lt;/description&gt;
      &lt;author email="dev@cordova.apache.org" href="http://cordova.io"&gt;
          Apache Cordova Team
      &lt;/author&gt;
      &lt;content src="index.html" /&gt;
      &lt;plugin name="cordova-plugin-whitelist" version="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;
      &lt;plugin name="cordova-plugin-geolocation" spec="~2.2.0" /&gt;
  &lt;/widget&gt;
  </code></pre>
  
  <p>AndroidManifest code : </p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.terokarvinen.geo" 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.INTERNET" /&gt;
      &lt;application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true"&gt;
          &lt;activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize"&gt;
              &lt;intent-filter android:label="@string/launcher_name"&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;uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_GPS" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>while i try to run this application in firefox it gives my the exact geolocation.But when i try to run this same application in android device .It always give timeout expired.i dnt have any error in console.</p>
  
  <blockquote>
    <p>I had tested the my application is requested the GPS service of
    android .I had checked that in location menu which have my application
    in GPS request.</p>
  </blockquote>