title: AsyncTask onPostExecute never gets called
body: <p>I am not sure what I am doing wrong but onPostExecute never gets called.</p>
  
  <ul>
  <li>Created a base class called BaseActivity.java</li>
  <li>From my original Activity I extended this class.</li>
  <li>Placed PostToOpenFeint class inside BaseActivity</li>
  <li><p>Called it from the UI thread from the main activity my doing: </p>
  
  <pre><code>new PostToOpenFeint.execute();
  </code></pre></li>
  </ul>
  
  <p>The onPreExecute(), doInBackground(..) gets triggered, but for some reason the onPostExecute never gets called.</p>
  
  <p>Thank you in Advance!</p>
  
  <p>Dave</p>
  
  <pre><code> private class PostToOpenFeint extends AsyncTask&lt;Void, Void, Void&gt; {
    /*
     * (non-Javadoc)
     * 
     * @see android.os.AsyncTask#doInBackground(Params[])
     */
    @Override
    protected Void doInBackground(Void... params) {
     // does all the work here
     return null;
    }
  
  
    /*
     * (non-Javadoc)
     * 
     * @see android.os.AsyncTask#onPostExecute(java.lang.Object)
     */
    @Override
    protected void onPostExecute(Void result) {
     // TODO Auto-generated method stub
     super.onPostExecute(result);
     Toast.makeText(MainScreen.this, "Done syncing", Toast.LENGTH_LONG).show();
    }
  
    /*
     * (non-Javadoc)
     * 
     * @see android.os.AsyncTask#onPreExecute()
     */
    @Override
    protected void onPreExecute() {
     // TODO Auto-generated method stub
     super.onPreExecute();
     Toast.makeText(MainScreen.this, "About to sync all your scores", Toast.LENGTH_LONG).show();
    }
  </code></pre>
  
  <hr>
  
  <p>Looking into it more, this is what I was able to observe. For example if I place this call:                           </p>
  
  <pre><code> new PostToOpenFeint.execute();
  </code></pre>
  
  <p>right after onCreate of the Activity, then everything works fine. If I place this call say inside a button listener.</p>
  
  <pre><code>settingsButton.setOnClickListener(new View.OnClickListener() {
  public void onClick(View v) {
     new PostToOpenFeint.execute();
  }
  });
  </code></pre>
  
  <p>The onPostExecute() never gets called, not sure what I am doing wrong. The restriction I read was to call this from UI Thread and I am calling it from UI thread.</p>