Android Asynch Task inside AlertDialog not working
===

I display an Alertbox with ok or cancel.
I want to implement an asynch task on the press of OK. Havent done asynch and been struggling with it for awhile. I dont understand where the asych class goes also. Does it go outside the method that is being executed or outside of it? Current code as follows:
    
     private abstract  class DoAsynchTask extends AsyncTask<Void,Void,Void> 
     {
      protected  void doInBackground()
      {
       Drawable drawable= getImage(imageSelect);	 
       MakeWallPaper(drawable,1);
      }

      /* protected void onProgressUpdate(Integer... progress) 
      {
       setProgress(progress[0]);
      }*/

      protected void onPostExecute() 
      {
       Toast.makeText(getApplicationContext(), "Wallpaper Saved.",Toast.LENGTH_LONG).show();	  
       AlertDialogProcessing=0;
      }
     }

     public void getWallpaper(final View v)
     {
      if(AlertDialogProcessing==0)
      {	 
       final String title="Set Image to Wallpaper";
       final String message="Press OK to set as Wallpaper or CANCEL.\nWait after pushing OK.";
       final String ok="OK";
       final String cancel="CANCEL";
       final AlertDialog.Builder alertbox = new AlertDialog.Builder(this);
       alertbox.setCancelable(true);
       alertbox.setIcon(android.R.drawable.ic_dialog_alert);
       alertbox.setTitle(title);
       alertbox.setMessage(message);
       alertbox.setNegativeButton(cancel, null);
       final AlertDialog dlg = alertbox.create();
   
       alertbox.setPositiveButton(ok,new DialogInterface.OnClickListener()
       {  
    	 public void onClick(DialogInterface arg0, int arg1)
         {  
           SetWallPaperTask.execute(null,null,null);  //<<<<Wrong
           dlg.dismiss();
           Vibrate(ClickVibrate); 
         } 
        });
        alertbox.setNegativeButton(cancel,new DialogInterface.OnClickListener(){ public  void onClick(DialogInterface arg0, int arg1){AlertDialogProcessing=0;                     
         Vibrate(ClickVibrate); } });
	 alertbox.show();
        }
       }


