Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8604035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:28:11+00:00 2026-06-12T02:28:11+00:00

From android documentation: NOTE: Seeing Parcelable might have triggered the question, why is Android

  • 0

From android documentation:

NOTE: Seeing Parcelable might have triggered the question, why is Android not using the built-in Java serialization mechanism? It turns out that the Android team came to the conclusion that the serialization in Java is far too slow to satisfy Android’s interprocess-communication requirements. So the team built the Parcelable solution. The Parcelable approach requires that you explicitly serialize the members of your class, but in the end, you get a much faster serialization of your objects.

So we know that Parcelable is actually better than Serializable but, on the other hand,

Also realize that Android provides two mechanisms that allow you to pass data to another process. The first is to pass a bundle to an activity using an intent, and the second is to pass a Parcelable to a service. These two mechanisms are not interchangeable and should not be confused. That is, the Parcelable is not meant to be passed to an activity. If you want to start an activity and pass it some data, use a bundle. Parcelable is meant to be used only as part of an AIDL definition.

Ok man, but I need to pass a custom object list to my activity!So into the bundle I still have to put either a parcelable or a serializable!

For now I did this way:

public class MyObject implements Serializable{

and to pass:

 Bundle b = new Bundle();
 b.putSerializable("objList", anArrayListWithMyObjectElements);
 intent.putExtra("objList", b);

as ArrayList implements Serializable too it works fine…but I don’t see the point of using a bundle this way…but android tells me to not use Parcelable for activity communication…what’s the correct answer??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T02:28:12+00:00Added an answer on June 12, 2026 at 2:28 am

    In my exprience, I strongly suggest using Parcelable when you can, IPC or not. It’s Android’s de facto replacement for Java’s Serializable, and it’s more optimized.

    If you need help on how to parcel an object, let me know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read several times android documentation about the GetView DataAdapter class. From what
From the android documentation on Notifications : FLAG_ONLY_ALERT_ONCE Bit to be bitwise-ored into the
Starting from Android 3.2 I have this strange problem. It's very easy to reproduce:
Im using Bluetooth to transfer image from Android camera.callback to PC. on windows side
I have taken note of some recent (and not so recent) blog posts on
I'm trying to understand the documentation from Android for Sensor.TYPE_ACCELEROMETER: It gives this example:
Taken from the Android documentation about LayoutParams : FILL_PARENT, which means the view wants
I am trying to grab consecutive frames from android using opencv VideoCapture class. Actually
From the Android documentation, I gather that I can append the ContactsContract.Contacts.Data.CONTENT_DIRECTORY string to
I'll preface this question with the note that I have looked at this similar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.