I have defined LocationListener like this one and set through requestLocationUpdates() for both providers GPS and NETWORK.
public class geoListener implements LocationListener {
public void onStatusChanged(String provider, int status, Bundle extras) {
Log.d("test", "Status changed to " + status);
}
public void onLocationChanged(Location location) {
// do some things
}
}
What happend ON REAL DEVICE:
- Nothing. onStatusChanged is never called. Not when GPS gets fixed, not when GPS lost fix... just never. Other methods (eg. onLocationChanged) of used LocationListener are working properly.
What happend ON EMULATOR:
- onStatusChanged is called when I manually set location using ddms.
Expecting behavior ON REAL DEVICE:
- onStatusChanged should be called everytime the provider changed status between available or unavailable (temporarily or permanently). For example when GPS gets or lost fix.
Operating system ON REAL DEVICE:
- Android 2.2, FRF85B, Google Nexus One
Comment 1 by LetsF...@gmail.com, Aug 12, 2010 I'm also experiencing this issue, on a HTC Desire, Android 2.2
Comment 2 by jai.chan...@gmail.com, Sep 20, 2010 I am also facing the same issue on my Nexus one, Android 2.2
Comment 3 by digist...@gmail.com, Oct 9, 2010 This issue is also present on Android 2.2.1, build FRG83 on a Nexus One.
Comment 4 by davidsma...@gmail.com, Feb 10, 2011 Same behavior on Nexus S. LocationListener is registered but onStatusChanged is never called.
Nexus S Android 2.3.1
Kernel Version 2.6.35.7-g7f1638a
Build Number GRH78
OnStatusChanged DOES get called on the Samsung Galaxy S running 2.1
Comment 5 by pika...@gmail.com, Feb 20, 2011 Same issue on SH-03C, Android 2.1-update1.
OnStatusChanged does NOT get called.
Comment 6 by kurle...@gmail.com, May 19, 2011 Exactly the same issue on HTC Desire Android 2.2
onStatusChanged is not called.
Comment 8 by dutchtap...@gmail.com, Jul 28, 2011 Same issue on Samsung Galaxy S running 2.2
Comment 10 by dutchtap...@gmail.com, Aug 3, 2011 Updated to 2.3.3, still the same
Also tested on Galaxy S 2 with 2.3.3, no luck.
Also tested on old G1 HTC 1.6, it works on that device.
Strange..
Comment 11 by galandil...@gmail.com, Aug 6, 2011 On Nexus One 2.3.4 onStatusChanged is not called too - what is more interesting it did work on Android 1.6
other finding:
after acquiring GpsSatellite objects from GpsStatus none of them have isUsedInFix set to false