onPostExecute never called?
<pre><code>public static class TestTask extends AsyncTask&lt;Void, Integer, Integer&gt; {

    private String stacktrace;

    public TestTask (String stacktrace){

        this.stacktrace = stacktrace;
    }

    @Override
    protected Integer doInBackground(Void... params) {

        try {
            Log.i("async", "doInBackground 1"); //this gets logged
            HttpClient httpclient = new DefaultHttpClient();
            HttpPost httppost = new HttpPost("http://xx.xx:8080/android/service.php");
            List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(2);
            nameValuePairs.add(new BasicNameValuePair("action", "logexception"));
            nameValuePairs.add(new BasicNameValuePair("stacktrace", stacktrace));
            httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

            HttpResponse response = httpclient.execute(httppost);
            Log.i("async", "doInBackground 2"); //this gets logged
            return 1;

        } catch (Exception e) {
            e.printStackTrace();
            return 0;
        }

    }

    protected void onPreExecute(){
        Log.i("async", "onPreExecute"); //this gets logged
    }

    @Override
    protected void onPostExecute(Integer result) {
        Log.i("async", "onPostExecute"); //this doenst get logged!


    }
}
</code></pre>

<p>I've been checking out the other SO threads regarding this, but according to them, my code looks correct as far as i can tell. So why do i never reach <code>Log.i("async", "onPostExecute");</code>? Thanks</p>
