How to write and read ArrayList <String> for sending to android

In my project I have to write and read ArrayList<String>to send, I tried with writeList and writeStringList, but did not use it, I get exceptions when reading lists.

Can someone help me with this?

Thanks in advance.

+5
source share
2 answers

@JeremyRoman by: writeStringList, readStringListand createStringArrayListall there on Parcel, since the API 1.

+7
source

use this to write:

bundle.putStringArrayList(KEY, stringArrayList); 

and it is as follows:

ArrayList<String> stringArrayList = bundle.getStringArrayList(KEY);
0
source

All Articles