What is the difference between Parcelable and Serializable in Android and which one is the preferred way to pass data?

181 Views Asked by At

I've been using Serializable for a while now in Android to pass data between 2 Activities. However, I recently read about Parcelable. Do they work in the same way and which is the best/efficient way to pass data/custom Objects between Activities/Fragments? I've seen that there is some setup code required to setup a Parcelable class which I haven't been able to figure out yet. Please Advice. Thanks.

0

There are 0 best solutions below