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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:14:52+00:00 2026-05-25T16:14:52+00:00

if i were to pass a custom object to another activity/service using Parcelable using

  • 0

if i were to pass a custom object to another activity/service using Parcelable using

    ObjectA obj = new ObjectA();

    // Set values etc.

    Intent i = new Intent(this, MyActivity.class);
    i.putExtra("com.package.ObjectA", obj);

    startActivity(i);

and then read it in the new activity/service using

    Bundle b = getIntent().getExtras();
    ObjectA obj =b.getParcelable("com.package.ObjectA");

and were to then change the values of the objects fields in the first activity.

would the object in the second activity reflect this or does it act as a clone of the first object and never change?

if the second object never changes what would be the simplest way to implement this sort of behavior?

thanks in advance

  • 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-25T16:14:52+00:00Added an answer on May 25, 2026 at 4:14 pm

    No, changes will not be reflected into the original object. You may say that it acts as a clone of the first object, if you want. If you need to return a modified object, then do so. See about setResult, to which you may pass an Intent filled of return data (the modified object, in your case). Use it in conjunction with startActivityForResult.

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

Sidebar

Related Questions

How can I pass an object of a custom type from one Activity to
I want to pass a custom made vector object containing data from background service
how can i pass values from my custom components back to the main.mxml? i
How do you pass $_POST values to a page using cURL ?
I am trying to create a custom object in AS3 to pass information to
Using prototype.js, I create a custom object which is going to be a parameter
While using reflection in C#, you're expected to pass an object[] of the parameters
I need to post a notification using postNotificationName:object:userInfo: method, and I'm passing a custom
I'm trying to make an ArrayList Parcelable in order to pass to an activity
In Python 2.x , I could pass custom function to sorted and .sort functions

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.