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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:23:29+00:00 2026-06-08T09:23:29+00:00

i would like to send the values from one activity to another but i

  • 0

i would like to send the values from one activity to another but i got null in the second activity please solve my problem.the first activity contains blog_info the details of that
blog is send to second activity based on these values the second activity search places .

final ArrayList<Blog> blogList = (ArrayList<Blog>) message
                .getResultList("Blog");
        for (Blog blog : blogList) {
            int i=0;
                latitude_Array[i] = Double.parseDouble(blog.getLatitude_zzs());
                longitude_Array[i]=Double.parseDouble(blog.getLongitude_zzs());
                i++;
        }
        btn = (Button) findViewById(R.id.main_top_map_list);
        btn.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity.this,
                            MainActivity_MapList.class);
                    //The method putDoubleArray(String, double[]) in the type Bundle is not applicable for the arguments (String, Double[])
                    bundle.putDoubleArray("latitude_Array", latitude_Array);

                    // intent.putExtras(bundle);
                    finish();
                    startActivity(intent);
            }
        });

i have used a series of method such as :

bundle.putDoubleArray(key, value)

bundle.putSparseParcelableArray(key, value)

bundle.putParcelableArray(key, value)

bundle.putSerializable(key, value)

but i just get ‘null’ or ‘0.0’ in the second activity.

  • 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-08T09:23:30+00:00Added an answer on June 8, 2026 at 9:23 am

    first, in the code you posted, you are putting an arraylist of lists of doubles, but then casting it to an arraylist of ? extends parcelable. those aren’t the same type.

    i assume you just want to pass a list (or array) of doubles. you can either use putDoubleArray() or putSerializable(). if you want to deal with an array of doubles, you need to have your doubles in a double[], like,

    double[] doubles = ...; // whatever
    bundle.putDoubleArray(key, doubles);
    

    to get them out on the other side,

    double[] doubles = bundle.getDoubleArray(key);
    

    if you want to pass your doubles in an array list, you must have your doubles in an ArrayList<? implements Serializable> … e.g., ArrayList<Double>. like this,

    ArrayList<Double> doubles = ...; // whatever
    bundle.putSerializable(key, doubles);
    

    to get them out of the bundle on the other side,

    ArrayList<Double> doubles = (ArrayList<Double>)bundle.getSerializableExtra(key);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hi i would like to send string arraylist values from one class another class.i
I would like to send the message from HelloWorldLayer, and receive it in ScoreLayer,
I would like to send out an update of my apk, but i did
I would like to send a struct from my client program to a server
Ideally I would like to send an object of type ArrayList<ArrayList<ASimpleClass>> from a remote
I would like to send a javascript array to be processed by a method
I would like to send a html string with a GET request like this
I would like to send and receive OpenSoundControl in an AIR application, on the
I would like to send a list of Appointment s through WCF. My Interface
I have completed my program and would like to send that program in its

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.