title: Calling multiple functions with Asynctask for network connection
body: <p>II want to build a class that every time I want to do a network connection, I'll use it.
  I want to open a dialog first and then make the network connection (or get something from SQL or download something from the web or update the SQL) and then close the dialog.</p>
  
  <p>I need to wait for the function to end before I can continue. </p>
  
  <p>I wanted to use <code>AsyncTask</code>, but I can't figure out a way to determine in the <code>AsyncTask</code> which function to use. I found two solutions, <code>switch-case</code> or trying to send a function with java reflection. Both solutions are not too good. </p>
  
  <p>Does someone have another idea or another way to do this?</p>