I am creating an app to manage homework, and have a class called Assignment. I wish to add an ArrayList to a bundle, how should I do this?
Is it something to do with serialisable/parsable data, if so, all the data contained within an Assignment is simple data such as Strings and Integers (with the exception of a Course object which also contains simple data types)?
You should use this method
Intent.putParcelableArrayListExtra()Of course the objects of the
ArrayListshould be parcelables!Moreover, in case your data is huge, you should not use an intent to “carry them” to another activity. Think of another approach (i.e. a MemoryManager class to handle your data).