Display Toast in doInBackground when I have exception
onProgressUpdate() method takes array of T objects (generally), in your case array of Integers.
You need to correct your method! Now it's not override super class method. Ten you are passing into this method number 1 so you need to correct your method.
The method have to looks like this:
protected void onProgressUpdate(Integer... integers) {
int value = integers[0];
if (value == 1) {
// show your Toast
}
}
And now it should works.
Please have a look carefully at AsyncTask docs.