I asked question here. Now I can pass arraylist to another activity.
In my second activity, I am trying to post this arraylist.
ArrayList<com.example.ss.myapp.BasicNameValuePair> testing = this.getIntent().getParcelableArrayListExtra("extraextra");
HttpClient httpclient1 = new DefaultHttpClient();
HttpPost httppost1 = new HttpPost(url);
httppost1.setEntity(new UrlEncodedFormEntity((List<? extends org.apache.http.NameValuePair>) testing));
I get an error: incompatible types: ArrayList<BasicNameValuePair> cannot be converted to List<? extends NameValuePair>
How can I cast ArrayList<com.example.ss.myapp.BasicNameValuePair> testing to ArrayList<NameValuePair> testing?
NameValuePairshould be referring to this link. Your class, according to your link, does not extendNameValuePair. To achieve that, you need to change your code:and implement/override all the necessary methods as you wish/is required.