Android's Intent Method for passing Java objects, androidintent
In Android, Intent provides two methods to pass Java objects: one is to call the putSerializable (Key, Object) method of the Bundle Object 【See examples], The other is by calling the putParcelable (Key, Object) method of the Bundle Object 【See examples].
The first method requires that the passed Java object implement the Serializable interface -- the Serializable interface is a special interface of JavaSE. It is very easy to implement class serialization using this method. It is declared that the system will automatically serialize it.
The second method requires that the passed Java object implement the Parcelable interface -- The Parcelable interface is a special Android interface, this method is more efficient than Serializable interface implementation to achieve class serialization (using the Serializable interface to achieve serialization will produce a large number of temporary variables, resulting in frequent GC ), however, implementing the Parcelable interface is more complex than implementing the Serializable interface. We recommend implementing the Parcelable interface in terms of efficiency.