In my project I have a AsyncTask that fetches some JSON data from the net, from which I build a
List<Map<String,String>> typesCategory = new ArrayList<Map<String, String>>();
I now need to pass this List to my next intent. Looking at the API, I dont see any methods that support passing a list. What is the best way to accomplish this?
protected void onPostExecute(List result) {
progress.dismiss();
Intent action = new Intent(this, ListTypeActivity.class);
action.putExtra("data", result);
}
Arbitrary data can be passed along via
Bundle,Parcelable, orSerializable, whichever fits your needs. In case of Parcelable, you can even pass an array of them.Also,
ArrayListalready implementsSerializable, and so do mostMapimplementations.