I have a class, which contains an array list of another object, when I try to pass the data to another activity, it does not pass other objects like my array list Appointment, how to do? Here are my classes:
open class Customer(var name: String = "") : Serializable{
var appointments: List<Appointment>? = null
}
And:
class Appointment(val id: String?, val title: String?, val date: Date) : Serializable {
}
To pass data:
putExtra("customer", customer)
To get data:
intent.getSerializableExtra("customer") as Customer?
It works, but the list of appointments is not sent, only the customer, why?
The list is not null before doing the startActivity, but when I do the getIntent I get the null list, it was not sent