how to retrieve data from server in Oncreate method of Activity in Android?
===

Hi i am new to android development.
i have an url which has an xml format data 
i want to display that data in edittext i have used following code 
but the MeetCode is not passing to server. 
can anyone help? Please 
Here is my code snippet 
i am getting the data from the following link as 

http://mopharma.com/app/MeetingDetails.aspx?MeetCode=270




       public class DoctorActivity extends Activity 
        {  

	      ArrayList<DoctDetails> listDoctDetails=new ArrayList<DoctDetails>();
	    EditText editTextDoct,editTextArea,editTextDate,editTextTime;

	ListView listView;  
    Button back;
	DoctListAdapter objDoctListAdapter;
	int postion=0; 
	  String MeetCode="";     
	  
		  @Override     
	protected void onCreate(Bundle savedInstanceState) 
	{       
		super.onCreate(savedInstanceState);
		setContentView(R.layout.doct_list);
		getDataQuesInfo();
		editTextDoct = (EditText)findViewById(R.id.dr_name);
		editTextArea = (EditText)findViewById(R.id.area_name);
		editTextDate = (EditText)findViewById(R.id.dat);
		editTextTime = (EditText)findViewById(R.id.tam);
                 
	/*	Intent i=getIntent();
		if(i.hasExtra("postion"))   
		{
			postion=i.getIntExtra("postion", 0);
			MeetCode=listDoctDetails.get(postion).getMeetCode();
		}
		*/      
			Log.v("MeetCode", "meedata");
		//	MeetCode = i.getStringExtra("MeetCode");
			 List<NameValuePair> nameValuePairs ;
		     nameValuePairs = new ArrayList<NameValuePair>(1);
		     nameValuePairs.add(new BasicNameValuePair("MeetCode", MeetCode));
		 	 new DoctDetailsaAsyTask(getApplicationContext(), nameValuePairs,MeetCode).execute();
		   
			   
	        
		 
		 listView=(ListView)findViewById(R.id.doct_listview_doc);
		objDoctListAdapter=new DoctListAdapter(getApplicationContext());
		listView.setAdapter(objDoctListAdapter);	
		back =(Button)findViewById(R.id.backbtn);
		 back.setOnClickListener(new Button.OnClickListener(){
      
			 
	       	   public void onClick(View arg0) {
	       	    // TODO Auto-generated method stub
	       		Log.v("Tourplan", "Clear data");
	 		   listDoctDetails.clear();           
	 		 	listDoctDetails.removeAll(listDoctDetails);
	 		 	XMLHandlerDocterDetail.code.removeAll(XMLHandlerDocterDetail.code);
	 		 	XMLHandlerDocterDetail.area.removeAll(XMLHandlerDocterDetail.area);
	 		 	XMLHandlerDocterDetail.docter.removeAll(XMLHandlerDocterDetail.docter);
				XMLHandlerDocterDetail.meeting_date.removeAll(XMLHandlerDocterDetail.meeting_date);
	 		 	XMLHandlerDocterDetail.meeting_time.removeAll(XMLHandlerDocterDetail.meeting_time);
				
			 	objDoctListAdapter.notifyDataSetChanged();
	 		   
	 		   Intent i=new Intent(getApplicationContext(), DocterListActivity.class);
	 		    startActivity(i);
	 		    finish();
	       	   }});
		   
	}   
	 public  void getDataQuesInfo()
	  {
	    	 ORM_db_Helper ormdb=new ORM_db_Helper(getApplicationContext());
			 try {
					Dao<DoctDetails, Integer> dbAcs =ormdb.getDoctDetailsDao();
					if(dbAcs.isTableExists() )
					{
						CloseableIterator<DoctDetails> itr=dbAcs.iterator();
						while(itr.hasNext()){
						   	listDoctDetails.add(itr.next());
						
						}
					}		
					Log.d("crm","list size doc ="+listDoctDetails.size());
				} catch (Exception e) 
				{
					e.printStackTrace();
				}
	 }   
	 
	 private class DoctListAdapter extends  BaseAdapter
		{
			private LayoutInflater mInflater;
			public DoctListAdapter(Context context){mInflater = LayoutInflater.from(context);}	
			public int getCount(){
				Log.d("crm","posititon="+listDoctDetails.size());
				return listDoctDetails.size();}
			public Object getItem(int position){
				Log.d("crm","posititon="+position);
				return position;}
			public long getItemId(int position){
				Log.d("crm","posititon="+position);
				return position;}

		public View getView(int position, View convertView, ViewGroup parent) 
		{
			
			ViewHolder holder;
			if (convertView == null) 
			{
				 convertView = mInflater.inflate(R.layout.doctor_details, null);
				 holder = new ViewHolder();
				 holder.doc_name=(EditText)convertView.findViewById(R.id.dr_name);
		 		 holder.area = (EditText)convertView.findViewById(R.id.area_name);
		 		 holder.meet_date = (EditText)convertView.findViewById(R.id.dat);
		 		 holder.meet_time = (EditText)convertView.findViewById(R.id.tam);
		 		 convertView.setTag(holder);
			} else 
			{
				holder = (ViewHolder) convertView.getTag();
			}
				holder.doc_name.setText(listDoctDetails.get(position).getDocter());
				holder.area.setText(listDoctDetails.get(position).getArea());
				holder.meet_date.setText(listDoctDetails.get(position).getMeet_date());
				holder.meet_time.setText(listDoctDetails.get(position).getMeet_time());
				
				return convertView;
		}
		class ViewHolder 
		{    
		    EditText doc_name, area,meet_date,meet_time;
			
		}


           }
	    
	 public  int getData(Context context, String name,String pass)
	 {
		try
		 {
			ORM_db_Helper ormdb=new ORM_db_Helper(context);
			Dao<CompanyDetails, Integer> persDao = 	ormdb.getCompDetailDao();
			QueryBuilder<CompanyDetails, Integer> queryBuilder =persDao.queryBuilder();
			Where<CompanyDetails, Integer> where = queryBuilder.where();
			//where.eq(Main_Personnages_Table.NAME, search);
			where.like(CompanyDetails.EMP_NAME, name);
			where.like(CompanyDetails.PASSWORD, pass);
			where.and(2);
			queryBuilder.setWhere(where);
			PreparedQuery< CompanyDetails> prQyr=queryBuilder.prepare(); 
			return persDao.query(prQyr).size();
	    }catch (Exception e) 
		{
	    	e.printStackTrace();
			return 0;
		}finally{
		}
       }
	 

	 class DoctDetailsaAsyTask extends AsyncTask<Void, Void, Integer>
	 {   
	 		Context context;
	 		String MeetCode;
	 	//	 private ProgressDialog dialog;
	 		List<NameValuePair> nameValuePairs ;
	 		public DoctDetailsaAsyTask(Context context,List<NameValuePair> nameValuePairs, String MeetCode) 
	 		{  
	 			this.context=context;
	 			this.nameValuePairs=nameValuePairs;
	 			this.MeetCode=MeetCode;
	 		}
	 		  
	 		@Override
	 		protected void onPreExecute(){
	 			super.onPreExecute();
          
	 		
	 		}
	 		@Override
	 		protected Integer doInBackground(Void... params) 
	 		{
        //	 if(Utils.isConnected(getApplicationContext()) && Utils.IsFirstApp)
       //	 			{
	 				   
	 				    
	 	 			Log.d("crm", "call first api");
	 	 			String response=HttpRequest.postData(Utils.DOCTOR,nameValuePairs);
	 	 			Log.v("NAME_VAL_PAIR", ""+nameValuePairs);
	 	 			Log.d("crm", "respo="+response);
	 	  			XMLParse(response);
	 	 			inserDataDb(MeetCode);
	 	 			Utils.IsFirstApp=false;
                //       	}
	 			 return getData(getApplicationContext(),MeetCode);
	 		}    
	 		   
	 		@Override
	 		protected void onPostExecute(Integer result) 
	 		{
	 			super.onPostExecute(result);
	 			//dialog.dismiss();
	 			Log.d("crm", "result ="+result);
	 		}
	 	}	       
	 
	   private void XMLParse(String line)
	   {
		   Log.d("crm","data ="+line);
		   
			SAXParserFactory spf = SAXParserFactory.newInstance();
			SAXParser sp;
			try {
				sp = spf.newSAXParser();
				XMLReader xr = sp.getXMLReader();
				XMLHandlerDocterDetail myXMLHandler = new XMLHandlerDocterDetail();
				xr.setContentHandler(myXMLHandler);
				ByteArrayInputStream in = new ByteArrayInputStream(line.getBytes());
				InputSource is = new InputSource();
				is.setByteStream(in);
				xr.parse(is);   
			} catch (Exception e) {
				e.printStackTrace();
			}
	 }         
	
	 private void inserDataDb(String MeetCode)
	 {
	 		 try        
	 		 {    
	 			ORM_db_Helper db = new ORM_db_Helper(getApplicationContext());
				Dao<DoctDetails, Integer> doctDetailsDao = db.getDoctDetailsDao();
				Log.d("crm","sixe="+XMLHandlerDocterDetail.code.size());
				for(int i=0; i< XMLHandlerDocterDetail.code.size(); i++)
				{    
					doctDetailsDao.create(new DoctDetails(XMLHandlerDocterDetail.code.get(i),XMLHandlerDocterDetail.docter.get(i), XMLHandlerDocterDetail.area.get(i), XMLHandlerDocterDetail.meeting_date.get(i), XMLHandlerDocterDetail.meeting_time.get(i),MeetCode));
				}   
	 		 }catch (Exception e) {
	 			 e.printStackTrace();
		}   
	 }
	public  int getData(Context context, String MeetCode)
	{
				try    
			  	 {
					ORM_db_Helper ormdb=new ORM_db_Helper(context);
					Dao<DoctDetails, Integer> persDao = 	ormdb.getDoctDetailsDao();
					QueryBuilder<DoctDetails, Integer> queryBuilder =persDao.queryBuilder();
					Where<DoctDetails, Integer> where = queryBuilder.where();
					where.like(DoctDetails.MEET_CODE, MeetCode);
					queryBuilder.setWhere(where);
					PreparedQuery< DoctDetails> prQyr=queryBuilder.prepare(); 
					return persDao.query(prQyr).size();
			    }catch (Exception e) 
				{   
					e.printStackTrace();
					return 0;  
				}finally{
				}  
	    }
    }
