async process dialog not showing in application in android
<p>Hi friends 
     async process dialog not showing  in application in android  can anybody tell what is the problem?</p>

<p>My code</p>

<pre><code>public void onClick(View v)
 {
  new FetchTask(getBaseContext()).execute(null); 
         }





 public class FetchTask extends AsyncTask&lt;Object, ArrayList,ArrayList&gt; 
 { 

     private ProgressDialog dlg; 
     private Context ctx; 

     public FetchTask(Context context) { 
         ctx = context; 
     } 

     @Override 
     protected void onPreExecute() { 
         dlg = new ProgressDialog(ctx); 
         dlg.setMessage("Loading...."); 
         dlg.show();
         super.onPreExecute(); 
     } 

     @Override 
     protected void onPostExecute(ArrayList parserValue) { 
         dlg.dismiss(); 

           for(int i=0;i&lt;parservalue.size();i++)
             {
                DomParserDataSet dataset=(DomParserDataSet)parservalue.get(i);  
                 if(dataset.getToken_string().length()&gt;1)
                      {


                  Intent homeIntent=new Intent(ctx,HelloTabWidget.class);
                  homeIntent.putExtra("strUserName", username);
                  homeIntent.putExtra("strPassword",password );
                  homeIntent.putExtra("questGroupId",dataset.getQuest_group_id());
                  homeIntent.putExtra("userid",dataset.getUser_id());
                  homeIntent.putExtra("systemuserid", dataset.getSystem_user_id());
                  homeIntent.putExtra("providerid",dataset.getIndex_provider_id());
                       startActivity(homeIntent);
                   //startActivity(new Intent(this,HelloTabWidget.class));

                   }
                   else
                   {


                     DomParserDataSet dataset1=(DomParserDataSet)parservalue.get(i);   
                     AlertDialog.Builder alertbox = new AlertDialog.Builder(ctx);
                      alertbox.setMessage(dataset1.getError_value());
                         alertbox.setNeutralButton("Ok", new DialogInterface.OnClickListener() {


                           public void onClick(DialogInterface dialog, int arg1) {
                               // the button was clicked

                            dialog.cancel();

                           }
                       });

                       // show it
                       alertbox.show();  






                   }

             } 

             // display data 
         }

  @Override
  protected ArrayList doInBackground(Object... arg0) {



   try
      {
          username=edtUserName.getText().toString();
          password=edtPassword.getText().toString();
          WebService service=new WebService();
          String webservicevalue=service.callServer(SOAP_ACTION,"", username,password,URL);
            webservicevalue=decodeXMLData(webservicevalue);
            DomParser xmlParser=new DomParser();
           parservalue=xmlParser.parseXmlFile(webservicevalue);

           String parservalue1=Integer.toString(parservalue.size());

           Log.d("parser value size is",parservalue1);


            }
             catch (Exception e) {
       // TODO: handle exception
              e.printStackTrace();
      }




             return parservalue;
       } 



 } 
</code></pre>

<p>can anybody tell what i have to change</p>
