title: Asynchronous update Android context menu
body: <p>Word up, I need to update a context menu for a widget (listview in this case).</p>
  
  <p>The items for the menu need to come from a call to a web service. If the web service call is made synchronously on the main UI thread then this works. </p>
  
  <p>However due to fact that I'm calling a web service it needs to been done asynchronously via an AsyncTask or similar to avoid ANRs etc. This asynchronous update of the menu via menu.add() within the onCreateContextMenu doesn't work, i.e. asynchronous calls to menu.add() don't result in the context menu being displayed. Also note the async menu updates are done on the UI thread via the onPostExecute of an AsyncTask.</p>