My calling activity:
public class Hello extends Activity { public void onCreate(Bundle savedInstanceState) { MyTask mt = new MyTask(this); mt.exe
((Activity)mContext).finish();
Would be the correct way to cast a Context to an Activity and call its finish() method. Not sure why you'd want to finish an Activity from an AsyncTask though
Context
Activity
finish()
AsyncTask