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 think is correct. I think I'm going wrong with the context parameter, what should I pass in as a value?
EDIT: Showing code below
@Override
protected void onProgressUpdate(String... strings){
Toast toast = Toast.makeText(MainActivity.this, strings[0], Toast.LENGTH_LONG);
toast.show();
}
MainActivity.this is saying "No enclosing instance of the type MainActivity is accessible in scope." I'm not sure what to pass as a context instead.
Thanks