title: pass value from first activity to fourth activity in android
body: <p>Hi this is my singlemenuitemactivity:</p>
  
  <pre><code>public class SingleMenuItemActivity extends ExpandableListActivity {
  
  
  Button btninsert;
  String selectedItem;
  
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.particular);
  
   Button btninsert = (Button) findViewById(R.id.btn_insert);
   btninsert.setOnClickListener(new View.OnClickListener() {
  
  
  
     public void onClick(View v) {
   // Switching to Register screen
   Intent i = new Intent(getApplicationContext(), InsertionExample.class);
    String s1= getIntent().getStringExtra("orderid");
  
    i.putExtra(KEY_NAME, orderid);
    startActivity(i);
     } 
    });    
  
  
      // Construct Expandable List
      final String NAME1 = "payment_method1";
      final String NAME = "payment_method";
      final String TOTAL = "total";
      final String TOTAL1 = "total1";
     final String ID = "orderid";
      final String ID1 = "orderid1";
      final String IMAGE = "image"; 
      final String FNAME1 = "firstname1";
  
      final String FNAME = "firstname";
      final String LNAME1 = "lastname1";
      final String LNAME = "lastname";
  
      final LayoutInflater layoutInflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      final ArrayList&lt;HashMap&lt;String, String&gt;&gt; headerData = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  
      final HashMap&lt;String, String&gt; group1 = new HashMap&lt;String, String&gt;();
      group1.put(NAME, "OrderInfo");
      headerData.add( group1 );
  
      final HashMap&lt;String, String&gt; group2 = new HashMap&lt;String, String&gt;();
      group2.put(NAME, "CustomerInfo");
      headerData.add( group2);
  
    // final HashMap&lt;String, String&gt; group3 = new HashMap&lt;String, String&gt;();
     // group3.put(NAME, "Group 3");
     // headerData.add( group3);
  
  
      final ArrayList&lt;ArrayList&lt;HashMap&lt;String, Object&gt;&gt;&gt; childData = new ArrayList&lt;ArrayList&lt;HashMap&lt;String, Object&gt;&gt;&gt;();
  
      final ArrayList&lt;HashMap&lt;String, Object&gt;&gt; group1data = new ArrayList&lt;HashMap&lt;String, Object&gt;&gt;();
      childData.add(group1data);
  
      final ArrayList&lt;HashMap&lt;String, Object&gt;&gt; group2data = new ArrayList&lt;HashMap&lt;String, Object&gt;&gt;();
      childData.add(group2data);
  
    //  final ArrayList&lt;HashMap&lt;String, Object&gt;&gt; group3data = new ArrayList&lt;HashMap&lt;String, Object&gt;&gt;();
    //  childData.add(group3data);
  
      // Set up some sample data in both groups
      for( int i=0; i&lt;1; ++i) {
          final HashMap&lt;String, Object&gt; map = new HashMap&lt;String,Object&gt;();
          String s= getIntent().getStringExtra("payment_method");
          String s1= getIntent().getStringExtra("total");
          String selectedItem= getIntent().getStringExtra("selectedItem");
          String s5= getIntent().getStringExtra("orderid");
          map.put(NAME1, "Payment_method:");
          map.put(NAME, s );
          map.put(TOTAL1, "Total:");
          map.put(TOTAL, s1);
          map.put(ID1, "Total:");
          map.put(ID, s5);
          group1data.add(map);
       //  map.put(IMAGE, getResources().getDrawable((i%3==0? R.drawable.color_green : R.drawable.color_red)));
        //  ( i%2==0 ? group1data : group2data ).add(map);
      }
      final HashMap&lt;String, Object&gt; map = new HashMap&lt;String,Object&gt;();
      String s1= getIntent().getStringExtra("firstname");
      String s2= getIntent().getStringExtra("lastname");
  
      map.put(FNAME, s1);
      map.put(FNAME1, "Firstname:");
      map.put(LNAME, s2);
      map.put(LNAME1, "Lastname:");
  
   //  map.put(IMAGE, getResources().getDrawable(R.drawable.color_yellow));
      group2data.add(map);
  
      setListAdapter( new SimpleExpandableListAdapter(
              this,
              headerData,
              R.layout.group_row,
              new String[] { NAME, FNAME },    // the names of the data
              new int[] { R.id.order },   // the text field to populate with the field data
              childData,
              0,
              null,
              new int[] {}
          ) {
              @Override
              public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
                  final View v = super.getChildView(groupPosition, childPosition, isLastChild, convertView, parent);
  
                //  Spinner spinner = (Spinner) findViewById(R.id.spnMusketeers);
  
                  // Populate your custom view here
                  ((TextView)v.findViewById(R.id.payment_method1)).setText( (String) ((Map&lt;String,Object&gt;)getChild(groupPosition, childPosition)).get(NAME1) );
                  ((TextView)v.findViewById(R.id.payment_method)).setText( (String) ((Map&lt;String,Object&gt;)getChild(groupPosition, childPosition)).get(NAME) );
                  ((TextView)v.findViewById(R.id.firstname)).setText( (String) ((Map&lt;String,Object&gt;)getChild(groupPosition, childPosition)).get(FNAME) );
                  ((TextView)v.findViewById(R.id.firstname1)).setText( (String) ((Map&lt;String,Object&gt;)getChild(groupPosition, childPosition)).get(FNAME1) );
                  ((TextView)v.findViewById(R.id.total1)).setText( (String) ((Map&lt;String,Object&gt;)getChild(groupPosition, childPosition)).get(TOTAL1) );
                  ((TextView)v.findViewById(R.id.total)).setText( (String) ((Map&lt;String,Object&gt;)getChild(groupPosition, childPosition)).get(TOTAL) );
                  ((TextView)v.findViewById(R.id.lastname)).setText( (String) ((Map&lt;String,Object&gt;)getChild(groupPosition, childPosition)).get(LNAME) );
                  ((TextView)v.findViewById(R.id.lastname1)).setText( (String) ((Map&lt;String,Object&gt;)getChild(groupPosition, childPosition)).get(LNAME1) );
  
  
                  return v;
              }
  
              @Override
              public View newChildView(boolean isLastChild, ViewGroup parent) {
  
                   return layoutInflater.inflate(R.layout.expandable_list_item_with_image,null, false);
  
              }
          }
      );
      ExpandableListView list = (ExpandableListView) findViewById(android.R.id.list);
      list.setOnChildClickListener(new OnChildClickListener(){
          public boolean onChildClick(ExpandableListView parent, View v,
                  int groupPosition, int childPosition, long id) {
              System.out.println("Group:"+groupPosition+", Child: "+childPosition);
              return true;
          }
      });
  
  
  }} 
  </code></pre>
  
  <p>this is my insertionexample.java</p>
  
  <pre><code>public class InsertionExample extends Activity {
  private final String NAMESPACE = "http://xcart.com";
  private final String URL = "http://192.168.1.168:8089/XcartLogin/services/update?wsdl";
  private final String SOAP_ACTION = "http://xcart.com/insertData";
  private final String METHOD_NAME = "insertData";
  Button btninsert;
  String selectedItem;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.change_status);
  
      //get reference to the spinner from the XML layout
      Spinner spinner = (Spinner) findViewById(R.id.spinner1);
      btninsert = (Button)findViewById(R.id.btn_insert1);
      btninsert.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
  
              EditText Orderid = (EditText) findViewById(R.id.orderid);
              String orderid = Orderid.getText().toString();
              TextView tv = (TextView) findViewById(R.id.textView1);
              tv.setText("Welcome ,"+getIntent().getExtras().getString("orderid"));
              SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
              PropertyInfo unameProp =new PropertyInfo();
              unameProp.setName("Status");//Define the variable name in the web service method
             unameProp.setValue(selectedItem);//Define value for fname variable
              unameProp.setType(String.class);//Define the type of the variable
              request.addProperty(unameProp);
  
  
                SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
                envelope.setOutputSoapObject(request);
                HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
  
                try{
                 androidHttpTransport.call(SOAP_ACTION, envelope);
                    SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
  
                   TextView result = (TextView) findViewById(R.id.textView2);
                    result.setText(response.toString());
  
             }
             catch(Exception e){
  
             }
  
  
  
          }
      });
  
      //attach the listener to the spinner
      spinner.setOnItemSelectedListener(new MyOnItemSelectedListener());
  
      //Dynamically generate a spinner data 
      createSpinnerDropDown();
  
  }
  
  //Add animals into spinner dynamically
  private void createSpinnerDropDown() {
  
      //get reference to the spinner from the XML layout
      Spinner spinner = (Spinner) findViewById(R.id.spinner1);
  
      //Array list of animals to display in the spinner
      List&lt;String&gt; list = new ArrayList&lt;String&gt;();
  
      list.add("Q");
      list.add("P");
      list.add("F");
      list.add("I");
      list.add("C");
  
      //create an ArrayAdaptar from the String Array
      ArrayAdapter&lt;String&gt; dataAdapter = new ArrayAdapter&lt;String&gt;(this,
              android.R.layout.simple_spinner_item, list);
      //set the view for the Drop down list
      dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      //set the ArrayAdapter to the spinner
      spinner.setAdapter(dataAdapter);
      //attach the listener to the spinner
      spinner.setOnItemSelectedListener(new MyOnItemSelectedListener());
  
  }
  
  public class MyOnItemSelectedListener implements OnItemSelectedListener {
  
      public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int pos, long id) {
  
           selectedItem = parent.getItemAtPosition(pos).toString();
  
   }
  
      @Override
      public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
          // TODO Auto-generated method stub
  
      }
  
  
  
      }
  
      public void onNothingSelected(AdapterView&lt;?&gt; parent) {
          // Do nothing.
      }
  }
  </code></pre>
  
  <p>here my doubt is the orderid is parsed from xml parsing...the update operation is performed soap calling..now here i have to update the status from orderid...how is to do..this is my update query.</p>
  
  <pre><code>"UPDATE `xcart_orders` set `status` = '"+Status+"' where `orderid` = '"+Orderid+"'"
  </code></pre>
  
  <p>please help me...how is update status depends upon orderid from xml parsing..how is change my code...how is to do...please help me</p>