title: How do I get sharedpreferences in Asynctask?
body: <p>I am writing an android application for my school project but i am stuck here. The problem is i have to access a <code>SharedPreferences</code> value and need it in an <code>AsyncTask</code> class. When I try to access it, it wont let me because of the context. How can i reach my <code>SharedPreferences</code> in my <code>AsyncTask</code>?</p>
  
  <pre><code>public class CheckAccess extends AsyncTask&lt;JSONObject, Integer, Boolean&gt;{
  
  
      @Override
      protected Boolean doInBackground(JSONObject... params) {
  
          //Trying to get sharedpreferences here wont work.
  
          return null;
      }
  
  }
  </code></pre>