I am trying to define a Context in my main Activity  and use it in my AsyncTask, but it gives a null reference?
Here I test it in my main Activity and the same error occur in my AsyncTask:
public class MainActivity extends AppCompatActivity {
public  Context mContext;
public Context getContext(Context context) {
    this.mContext = context;
    mContext.getContentResolver();//  null object reference error
    return mContext;
} 
 
     
     
     
     
    