I\'m doing some background work and showing a DialogFragment while I do that. Once my work is done and the relevant callback is invoked, I dismiss the dialog. When I do, I get a
My bet would be that the code you posted is from the background thread... you aren't allowed to update the UI from anywhere other than the UI thread.
You can use onPostExecute() or runOnUiThread() to achieve your goal (if my guess is right about what is happening)