title: How to use SQLite DB from AsyncTask?
body: <p>I've been using my Activity class to access my DB which made my program freeze sometimes.</p>
  
  <p>So I decided to use AsyncTask instead to handle the DB.</p>
  
  <p>My problem is I don't know how to instantiate my SQLite DB "TheDB" from AsyncTask's class</p>
  
  <pre><code>public class myClass extends AsyncTask&lt;Void, Void, Void&gt;{
  private TheDB db;
  
  any method() {
      this.db = new TheDB(this);  //&lt;-- Error here
  }
  </code></pre>
  
  <p>this worked fine on the Activity class, but it I dont know how to use it here</p>
  
  <p>TheDB's constructor is TheDB(Context context) but this class is not a "context" so how can i use my DB here?</p>
  
  <p>please provide examples if you can</p>
  
  <p>and please do not give me links to google's references, am a newbie and i find them hard to follow</p>