I\'m using picasso to load an image as a background for my activity, I want to use an AsyncTask, while the image is loading, when done the progress bar dismisses to give bet
My guess is that the error is because you are trying to modify an UI element (dialog) inside a background thread, which is not possible.
You don't need an AsyncTask for this, since Picasso already does the decoding in background.
AsyncTask
Picasso