In my activities onCreate method I start listening for location
updates as follows:

locationManager.requestLocationUpdates(bestProvider, 5000, 0,
myLocationListener);

Previously I used 60,000 ms instead of 5,000 ms.

The problem is that I have trouble getting the first update.

public void onLocationChanged(Location location){
if (location != null){
lastlocation = location;
}
}

onLocationChanged doesn't get called.

Now, if I switch to Maps and find the current location there, then
switch back to
my app, I finally get the onLocatinoChanged method to fire.

This whole location changed stuff seems rinky in Android. Is there a
way to
more directly insist that the Location hardware do it's thing?

Any help would be very much appreciated.

Best,

pawpaw17

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to