Thanks Lance, I just found that I was being hit by this bug/issue: http://code.google.com/p/android/issues/detail?id=3147
I was logging the time of the first fix using localized time, and it was appearing as if the callback was blocking for two seconds... Thanks On Dec 5, 6:26 pm, Lance Nanek <lna...@gmail.com> wrote: > Neither version blocks. The onLocationChanged method won't even be > called during the requestLocationUpdates call, only afterwards as a > separate event. > > On Dec 5, 4:04 pm, Mark Wyszomierski <mar...@gmail.com> wrote: > > > > > Hi, > > > Using LocationManager to get location updates: > > > LocationManager.requestUpdates( > > String provider, > > long minTime, > > float minDistance, > > LocationListener listener); > > > If our main UI thread registers the LocationListener, will it get > > blocked whenever the service is trying to get a fix?: > > > public class MyActivvity { > > > public void onCreate() { > > super.onCreate(); > > > LocationManager manager = > > getSystemService(Context.LOCATION_SERVICE); > > manager.requestLocationUpdates(..., > > new LocationListener() { > > public void onLocationChanged(Location location) { > > // is this going to block? > > } > > } > > ); > > } > > > } > > > There is of course the variant where you can supply a Looper, just not > > sure how it's working internally with calling-back - I was hoping it > > would simply post() the onLocationChanged() message by default, > > instead of attempting to do any work on the same thread before calling > > it, > > > Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en