title: Android LocationManager in AsyncTask
body: <p>Firstly, I know LocationManager doesn't have to be called in an AsyncTask as it's already non UI blocking :)</p>
  
  <p>I have an activity which
  1. Gets the users current location
  2. Calls a webservice to retrieve a list of specific POIs around that location.</p>
  
  <p>The user can choose to view the results as map or list using a TabActivity. Bearing this in mind the AsyncTask to get users location and call to webservice is managed by the TabActivity view rather than either of the docked views.</p>
  
  <p>So I want the TabActivity to start an AsyncTask which first gets the users location, then calls the webservice.  A progress dialog prevents switching views using the tabs during this process.</p>
  
  <p>It's pretty much all working apart from getting the users location from the AsyncTask.  The webservice code is written, the mapping and overlay code is written, the task progress dialog copes with orientation changes.</p>
  
  <p>The focus on location is speed rather than accuracy.  If the user chooses to view results on the mapview then I will provide a 'My location' button which will enable a more accurate location to be obtained.  I just want to initially get a rough location and return the search results quickly.</p>
  
  <p>Maybe I'm going about this the wrong way.  Maybe I should display the map view, let the map activity find the current location, then call just the webservice in the async - but then what if the user taps the list view tab during the location phase ?  I was also going to allow the user to specify their default view - some people may prefer a list to a map.  In this case I would have a listview which had to retrieve the location.</p>
  
  <p>Thanks for any advice
  Martin.</p>