PostExecute() of AsyncTask not loading. Where am I going wrong?
<pre><code>       package com.crumbin.tabs;

//java package
import java.io.IOException;
import java.util.ArrayList;

import org.json.JSONException;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.widget.ListView;

import com.crumbin.main.R;
import com.crumbin.models.User;
import com.crumbin.utilities.UserFollowingListAdapter;


public class HomeActivity extends Activity{

     final ArrayList&lt;User&gt; users1 = new ArrayList&lt;User&gt;();  
     User user;
//  public ArrayList&lt;User&gt; users1 = new ArrayList&lt;User&gt;();
     private UserFollowingListAdapter csl;
        private ListView lv;
   @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.user_main_tab_home);
      lv = (ListView) findViewById(R.id.user_crumbs_list); 

     // ListView lv = (ListView) findViewById(R.id.user_crumbs_list);








      AsyncLoader task = new AsyncLoader();
      task.execute();




      }



       private    class AsyncLoader extends AsyncTask&lt;String,Void, String&gt; {
               ProgressDialog dialog;

            @Override

            protected void onPreExecute(){
                 String pa = "helllo";
                   return;

            }

            @Override
            protected String doInBackground(String... pa) {
                String response = "";



                    try {

                      try {
                            user = new User("4eeb34c6d80e8f1214000000");
                            user.getFollowingCrumbsUpList();
                            for(User u : user.following){
                                users1.add(u);
                            }
                        } catch (IOException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        } catch (JSONException e) {
                            // TODO Auto-generated catch block
                            e.printStackTrace();
                        }








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

            return response;
            }

            protected void onPostExecute(String result) {
                //dialog.dismiss();
                ListView lv = (ListView) findViewById(R.id.user_crumbs_list);

                final UserFollowingListAdapter csl = new UserFollowingListAdapter(HomeActivity.this,R.layout.user_crumbs_list_item,users1,this);
                    lv.setAdapter(csl);
                return;

            }





       }





      public void showError(){
       new AlertDialog.Builder(this)
       .setTitle(" Oops , Server down :( ")
       .setPositiveButton("Ok", new DialogInterface.OnClickListener() {

           @Override
           public void onClick(DialogInterface arg0, int arg1) {
               // TODO Auto-generated method stub

           }
           //
       }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
           public void onClick(DialogInterface dialog, int whichButton) {
               // Do nothing.
           }
       }).show();

     }
}
</code></pre>

<p>Error: </p>

<pre><code>02-04 13:11:34.596: E/AndroidRuntime(2464): FATAL EXCEPTION: main
02-04 13:11:34.596: E/AndroidRuntime(2464): java.lang.ClassCastException: com.crumbin.tabs.HomeActivity$AsyncLoader cannot be cast to android.app.Activity
02-04 13:11:34.596: E/AndroidRuntime(2464):     at com.crumbin.utilities.UserFollowingListAdapter.&lt;init&gt;(UserFollowingListAdapter.java:40)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at com.crumbin.tabs.HomeActivity$AsyncLoader.onPostExecute(HomeActivity.java:106)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at com.crumbin.tabs.HomeActivity$AsyncLoader.onPostExecute(HomeActivity.java:1)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at android.os.AsyncTask.finish(AsyncTask.java:602)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at android.os.AsyncTask.access$600(AsyncTask.java:156)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:615)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at android.os.Handler.dispatchMessage(Handler.java:99)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at android.os.Looper.loop(Looper.java:137)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at android.app.ActivityThread.main(ActivityThread.java:4424)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at java.lang.reflect.Method.invokeNative(Native Method)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at java.lang.reflect.Method.invoke(Method.java:511)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-04 13:11:34.596: E/AndroidRuntime(2464):     at dalvik.system.NativeStart.main(Native Method)
</code></pre>

<p>No data is loading. The loop doesn't even reach the OnpostExecute(). What might be the error? I'm not getting errors. Just that it is not even reaching that part. </p>

<p>What I want to do is this: </p>

<p>Just load the data into a list. That is about it. And still this is not working. The logic is fine. This works if I use it without AsyncTask. But, if I put the code in it, it doesn't work. </p>
