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 7642679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:15:05+00:00 2026-05-31T09:15:05+00:00

I was wondering, why Google makes it so difficult to pass list of Objects

  • 0

I was wondering, why Google makes it so difficult to pass list of Objects around, from 1 activity to another activity, even though my activities are all within a single process?

  • http://androidideasblog.blogspot.com/2010/02/passing-list-of-objects-between.html
  • Help with passing ArrayList and parcelable Activity
  • http://developer.android.com/resources/faq/framework.html#3

Why can’t they just have something like

intent.putExtra("histories", listOfHistoryObjects);

Are they overly design?

  • 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-05-31T09:15:07+00:00Added an answer on May 31, 2026 at 9:15 am

    One reason:

    1. Activity A starts activity B, handling it an argument that is a direct pointer to an object.
    2. The user presses home.
    3. Your process is killed while in the background.
    4. The user returns to your app.
    5. Activity B is now re-created.
    6. Ooops, the object argument it was supposed to be running with no longer exists.

    Another reason:

    Activities are top-level components representing the major parts of your application. The platform manages them for you across processes; whether or not activity A and B are running in the same process, everything you supply to startActivity() must go through IPC to the system process, and the system process maintains the state about that activity and hands it back to your process when activity B needs to be created. It also maintains this across re-launches of your process. It couldn’t do any of this if it allowed any arbitrary Java object that couldn’t be transported across IPC boundaries.

    If you have elements of your UI that are tightly coupled, you can use Fragment to implement the separate parts of your UI. This class is not a top-level part of your application and does not provide any support for use across processes, so makes it easy to have direct interaction between fragments or a fragment and its activity.

    That said… this still doesn’t remove the need for you to work correctly in the first case. If you aren’t going to use the Bundle-based arguments for fragments (which allow the system to automatically take care of keeping that data across process instances), you will need to take care to implement onSaveInstanceState and such to correctly re-create your fragments in their appropriate state.

    Also please please do not use Serializable for storing objects into a Parcel or Bundle. As the documentation at http://developer.android.com/reference/android/os/Parcel.html#writeSerializable(java.io.Serializable) says, these is tremendously inefficient compared to implementing Parcelable (or even just using the built-in primitives in a Bundle).

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

Sidebar

Related Questions

Wondering if following will work for google in robots.txt Disallow: /*.action I need to
I am wondering how I can use google protocol buffers to accept a request
I was wondering if its possible to use the Google maps IFRAME code to
After a quick Google I couldn’t find anything too promising so I was wondering
I was wondering if anyone knows more about the inner workings of the Google
Was wondering, how do I add a custom marker to google maps, JavaScript, integrated
Wondering if anyone has gotten the infamous database is locked error from Trac and
I was just wondering where I could find more information on these optimizations? Google
I have tried the basic ones found in a Google search and even tried
In another question - Getting directory listing from SVN for use in ANT dropdown

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.