ProgressDialog vs. AsyncTask - won't show

view story

http://stackoverflow.com – I know this question has been asked multiple times, but I have an apparently clean code that just doesn't work, giving me no Exceptions or anything. I have a trivial one-button Activity (MainActivity). The button in it calls an AsyncTask in order to send an email in the background. I tried to do what I guess it's a pretty common thing: show a ProgressDialog when the task starts and dismiss it when it ends. To do so I put the above-mentioned code into AsyncTask.onPreExecute() and AsyncTask.onPostExecute(). I thought the problem was in the Context provided to the dialog constructor, but I creat (HowTos)