title: passing arraylist with namevalue pair from one activity to other activity?
body: <p>I am try to pass arraylist name value pair from one activity to other but its giving me the error
  the log stack is like this</p>
  
  <pre><code>04-24 18:16:56.732: E/AndroidRuntime(1632): FATAL EXCEPTION: main
  04-24 18:16:56.732: E/AndroidRuntime(1632): java.lang.RuntimeException: Parcel: unable to marshal value vehicle_model=dasd
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.os.Parcel.writeValue(Parcel.java:1235)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.os.Parcel.writeList(Parcel.java:622)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.os.Parcel.writeValue(Parcel.java:1195)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.os.Parcel.writeMapInternal(Parcel.java:591)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.os.Bundle.writeToParcel(Bundle.java:1619)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.os.Parcel.writeBundle(Parcel.java:605)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.content.Intent.writeToParcel(Intent.java:6470)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1741)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1411)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.app.Activity.startActivityForResult(Activity.java:3351)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.app.Activity.startActivityForResult(Activity.java:3312)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.app.Activity.startActivity(Activity.java:3522)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.app.Activity.startActivity(Activity.java:3490)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at com.example.jiffy.VehicleDetailsActivity.onClick(VehicleDetailsActivity.java:81)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.view.View.performClick(View.java:4084)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.view.View$PerformClick.run(View.java:16966)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.os.Handler.handleCallback(Handler.java:615)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.os.Handler.dispatchMessage(Handler.java:92)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.os.Looper.loop(Looper.java:137)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at android.app.ActivityThread.main(ActivityThread.java:4745)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at java.lang.reflect.Method.invokeNative(Native Method)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at java.lang.reflect.Method.invoke(Method.java:511)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
  04-24 18:16:56.732: E/AndroidRuntime(1632):     at dalvik.system.NativeStart.main(Native Method)
  04-24 18:16:58.922: I/Process(1632): Sending signal. PID: 1632 SIG: 9
  04-24 18:16:59.892: E/Trace(1650): error opening trace file: No such file or directory (2)
  </code></pre>
  
  <p>my code is like this</p>
  
  <pre><code>public class VehicleDetailsActivity extends Activity implements OnClickListener, Serializable {
      Button nextbutton;
      EditText vehiclemodel;
      EditText vehiclemake;
      EditText vehiclenumber;
      EditText seat;
      EditText kilometers;
      RadioGroup selectvehicle;
      RadioButton vehicletype;
      String vcategory;
      ArrayList&lt;NameValuePair&gt; vehicleinfo = new ArrayList&lt;NameValuePair&gt;();
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.vehicledetails);
          setTitle("VEHICLE DETAILS");
          nextbutton = (Button) findViewById(R.id.next);
          nextbutton.setOnClickListener(this);
      }
  @Override
  public void onClick(View v) {
      switch (v.getId()) {
      case R.id.next:
  
          Bundle vehicledetails = new Bundle();
          vehiclemodel = (EditText) findViewById(R.id.vehiclemodel);
          vehiclemake = (EditText) findViewById(R.id.vehiclemake);
          vehiclenumber = (EditText) findViewById(R.id.vehiclenumber);
          seat = (EditText) findViewById(R.id.seat);
          kilometers = (EditText) findViewById(R.id.kilometer);
          selectvehicle = (RadioGroup) findViewById(R.id.selectvehicle);
          int selected_vehile = selectvehicle.getCheckedRadioButtonId();
          vehicletype = (RadioButton) findViewById(selected_vehile);
  
          if(vehicletype.getText() == "premium") {
              vcategory = "1";
          }
          else if(vehicletype.getText() == "Economy") {
              vcategory = "2";
          }
          else {
              vcategory = "3";
          }
          vehicleinfo.add(new BasicNameValuePair("vehicle_model", vehiclemodel.getText().toString()));    
          vehicleinfo.add(new BasicNameValuePair("vehicle_make", vehiclemake.getText().toString().trim()));
          vehicleinfo.add(new BasicNameValuePair("vehicle_number", vehiclenumber.getText().toString()));
          vehicleinfo.add(new BasicNameValuePair("seat", seat.getText().toString().trim()));
          vehicleinfo.add(new BasicNameValuePair("kilometer", kilometers.getText().toString().trim()));
          vehicleinfo.add(new BasicNameValuePair("vehicle_type", vcategory));
          Intent it = new Intent(this, SetLocationActivity.class);
  
            it.putExtra("vehicleinfo", vehicleinfo);
          startActivity(it);
          break;
      }
  }
   }
  </code></pre>
  
  <p>I am successfully able to pass the data through bundle but i want array list because in next activity ican add new values to it and can pass that arraylist to my webservice.</p>