I\'m trying to raise a toast from asynctask, but I\'m having trouble getting my parameters right. I\'m toasting from onProgressUpdate, so I\'m on the UI thread, which I thi
If it's not an inner class declared at the point of use then MainActivity.this is likely to be out of scope. The only way to remedy the problem is to subclass AsyncTask and change the constructor to accept a context variable so you can set it in your custom class and use it from methods. Using getApplicationContext might work as well but I'm not sure how it will behave.