title: how to know when asynctask is finished
body: <pre><code>public class Calculate extends AsyncTask&lt;Void, Integer, Integer&gt; {
  
      @Override
      protected void onPreExecute() {
          super.onPreExecute();
      }
  
      @Override
      protected Integer doInBackground(Void... arg0) {
          int a = 1;
                  int b = 2
  
          return a+b;
      }
  
      @Override
      protected void onPostExecute(Integer result) {
          // TODO Auto-generated method stub
          super.onPostExecute(result);
  
      }
  
  }
  </code></pre>
  
  <p>my app use asynctask class (below), and a  function to call this class, 
  my question is how to know when this class is finished ? every time i check, its always Running !</p>