Steps to reproduce..
cordova create hello4 com.example.hello HelloWorld
cd hello4
cordova platform add android
cordova plugin add org.apache.cordova.geolocation
Replace index.html with the full example from here: http://docs.phonegap.com/en/3.1.0/cordova_geolocation_geolocation.md.html#Geolocation
add this to config.xml
<feature name="Geolocation">
<param name="android-package" value="org.apache.cordova.geolocation.GeoBroker" />
</feature>
then..
cordova build android
cordova run android
This produces the error: Code 3 Position retrieval timed out.
I have also tried with the Phone Gap online builder to no avail. Does anyone know how to fix this?
Many thanks
I can confirm that issue. I never get a GPS fix (Error Code 3, Position retrieval timed out) using this code from example:
However, in the genymotion emulator, where you can simulate a GPS device on an arbitrary position, it works just fine!
Anyone with a solution here? I'm using a HTC One X device with Android 4.1.1. GPS is enabled and works on other apps.
I'm seeing the same issue with Phonegap v3.1.0 but not with v2.9.0 - see my answer to this question: