I saw on code.google.com that there is a bug in method getLocationUpdate() when we try the following:
requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 1000L, 500.0f, this);
it throws :
09-06 22:46:16.163: ERROR/AndroidRuntime(351): Caused by: java.lang.IllegalArgumentException: provider=network
09-06 22:46:16.163: ERROR/AndroidRuntime(351): at android.os.Parcel.readException(Parcel.java:1325)
09-06 22:46:16.163: ERROR/AndroidRuntime(351): at android.os.Parcel.readException(Parcel.java:1275)
09-06 22:46:16.163: ERROR/AndroidRuntime(351): at android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:646)
09-06 22:46:16.163: ERROR/AndroidRuntime(351): at android.location.LocationManager._requestLocationUpdates(LocationManager.java:582)
09-06 22:46:16.163: ERROR/AndroidRuntime(351): at android.location.LocationManager.requestLocationUpdates(LocationManager.java:446)
Here is the link: http://code.google.com/p/android/issues/detail?id=19857
I want to know is this fixed yet.My app is crashing everytime it tries to get the location update.
Please first implements
implements LocationListenerif you have not written.otherwise
Try this link Get current Lat Lon i have solve my problem with this link.
Try this one…
Best of luck
And also try with using
LocationManager.NETWORK_PROVIDERistead ofLocationManager.GPS_PROVIDER.