title: AsyncTask calling main class method, did it work fully in background?
body: <p>This is my problem..i am calling a method in <code>doInBackground</code> of my <code>AsyncTask</code> class, the method is declared in my main activity class. Does it work in background thread? or i need to write the whole method inside the <code>doInBackground</code> ??</p>
  
  <pre><code>protected String doInBackground(String... params) {
      getAllUsersfromServer();            
  
      return null;
  }
  </code></pre>
  
  <p>this <code>getAllUsersfromServer();</code> is declared in the main class. the method download some data from server using REST.. </p>
  
  <p>I need to run this whole process in background thread. Does it works? </p>