Your app should always be coded to be able to handle getLastKnownLocation returning null. Something has to have requested location updates for there to be any last known location. For the GPS provider, for example, getLastKnownLocation will not turn the GPS on, but requestLocationUpdates will. See the documentation: http://developer.android.com/reference/android/location/LocationManager.html
On Jun 21, 2:31 pm, tarek attia <[email protected]> wrote: > Hi , > > I'm doing a GPS application ,and it worked fine till I updated the SDK for > API 8 ,,then after close and open eclipse once again I got this error in my > LgCat > > “Failed to find provider info for android.server.checkin ” > > and anytime I call "Location = > locationManager.getLastKnownLocation(provider);" > > I got Location=null and the application crashes > > Any Idea??????? > > -- > tarek -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

