How to pass Context to AsyncTask?
<p>How to pass context in <code>Async Task</code> class which is coded in different java file from <code>Main Activity</code> but it called from main activity?</p>

<p>Below is my code:</p>

<pre><code> @Override

protected void onPostExecute(List&lt;Movie_ModelClass&gt; result) {
        super.onPostExecute(result);

        if (result != null) {
            Movie_Adapter movieAdapter = new Movie_Adapter(new MainActivity().getApplicationContext() , R.layout.custom_row, result);
            MainActivity ovj_main = new MainActivity();
            ovj_main.lv_main.setAdapter(movieAdapter);
        } else {
            Toast.makeText(new MainActivity().getApplicationContext() ,"No Data Found", Toast.LENGTH_LONG);

        }
        if (progressDialog.isShowing()) {
            progressDialog.dismiss();
    }
</code></pre>