I am having a major issue, Geolocation is very inconsistant between Android devices.
The Geolocation on my Android Tablet is working (Samsung Galaxy), where as on my newest device Samsung Galaxy S3 – it doesn’t even return a response (unless I enable enableHighAccuracy, but then it stops the other devices from working). I’ve tested the Geolocation in the browser and on the Google Maps app which return correct responses (and immediate responses). On the HTC it also works fine
My manifest settings are as follows
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.wifi" />
<uses-feature android:name="android.hardware.location" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />
Are there any code-changes that I am supposed to do to PhoneGap to better support GeoLocation? Even testing it out on the DEFAULT example yields the exact same results.
Testing devices
-
Samsung Galaxy Tablet (Android 4.0.3) . Geolocation works fine
-
Samsung Galaxy S3 Mobile (Android 4.1.1). Geolocation only works in enableHighAccuracy on PhoneGap. Works without GPS enabled with GoogleMaps, and works on the Internet Browser
-
HTC (Android 2.3.3) . Geolocation works fine
-
Apple iPad, iPhone and iPod (I wish Android could somehow have control over hardware like apple does :()
Based on the information given, it is OS 4.1.x with PhoneGap 2.1 specific issue. After briefly searched from Google, it is a known issue, and no solution yet. Recommend to report bug directly to PhoneGap team, though they are busy migrating to new repo.
Reference: https://groups.google.com/forum/?fromgroups=#!topic/phonegap/ESrHAjFHgFU