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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:59:42+00:00 2026-05-20T18:59:42+00:00

I want to pass ArrayList objArrayList from one activity to second activity and want

  • 0

I want to pass “ArrayList objArrayList” from one activity to second activity and want to receive there. I am creating a simple class in that there are four arraylist. I m creating object of that class and calling method of that class by passing parameters to be added in arraylist. After that I m adding that class object in objArrayList.
HOw can I pass objArrayList from one activity to second activity and receive it there?

Thanks,
Vishakha.

  • 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-20T18:59:42+00:00Added an answer on May 20, 2026 at 6:59 pm

    First Context (can be Activity/Service etc)

    You have a few options:

    1) Use the Bundle from the Intent:

    Intent mIntent = new Intent(this, Example.class);
    Bundle extras = mIntent.getExtras();
    extras.putString(key, value);  
    

    2) Create a new Bundle

    Intent mIntent = new Intent(this, Example.class);
    Bundle mBundle = new Bundle();
    mBundle.extras.putString(key, value);
    mIntent.putExtras(mBundle);
    

    3) Use the putExtra() shortcut method of the Intent

    Intent mIntent = new Intent(this, Example.class);
    mIntent.putExtra(key, value);
    

    New Context (can be Activity/Service etc)

    Intent myIntent = getIntent(); // this getter is just for example purpose, can differ
    if (myIntent !=null && myIntent.getExtras()!=null)
         String value = myIntent.getExtras().getString(key);
    }
    

    NOTE: Bundles have “get” and “put” methods for all the primitive types, Parcelables, and Serializables. I just used Strings for demonstrational purposes.

    Your Arraylist class must be Parcelable or Serializable. So you should subclass it to add these functionalities as I think they miss from the original implementation.

    Then look into these other questions they will help you.
    Serialization issue with SortedSet, Arrays, an Serializable

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

Sidebar

Related Questions

Hi I want to pass an Arraylist from one activity to another. I use
I want to pass a custom object from one Activity to another, here is
I understand that there's a set of methods used to pass data from one
I'm trying to pass an ArrayList from my first Activity to the next one.
I have two activity and I want to pass ArrayList -> drawablesFromUrl objs from
I want to pass some ArrayList<Integer> X into method a(Collection<Integer> someCol) that takes Collection<Integer>
I am having a problem in trying to pass a ArrayList Object from Activity
I have an ArrayList<Location> and ArrayList<Long> that i want to pass it to a
I want to pass a delegate with the return type as ArrayList as parameter
I want pass a class-instace to a method of an other and be sure

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.