pentel
- Forum posts: 251
Jun 28, 2016, 8:13:51 PM via Website
Jun 28, 2016 8:13:51 PM via Website
Ashish Bisht
Hi everyone, i have been working on Android project and want to know your views on Serializable and Parcelable. Which is best approach in Android that will be helpful for me ?
Serializable
- standard Java interface
- implement the Serializable interface only
- no method to implement
- slow due to usage of reflection
- need extensive garbage collection
Parcelable
- Android specific interface
- more coding, need to implement the serialization
- more efficient than Serializable
- less garbage collection with custom code for marshaling and unmarshaling
- fast, heavilvy optimized code
If you want to write good efficient codes, take Parcelable approach.
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.