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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:03:51+00:00 2026-06-05T23:03:51+00:00

I m using one EditText field and one spinner. I have to pass teh

  • 0

I m using one EditText field and one spinner. I have to pass teh results of both to the next Activity. here, reqd_bloodgroup is the spinner item, i converted into String using:
reqd_bloodgrp = String.valueOf(spinner.getSelectedItem()); inside onItemSelected() of spinner.

intent.putExtra("city", citySelected.getText().toString());
intent.putExtra("bloodgroup", reqd_bloodgrp);
intent = new Intent(FindDonor.this,SpecificDonor.class);
startActivity(intent);

Here when i try to display these, there’s no problem. They’re correctly displayed. But when i try to fetch them in SpecificDonor activity, they show null values. The code used here is:

String text_city,text_bloodgroup;
text_city = getIntent().getStringExtra("city");
text_bloodgroup = getIntent().getStringExtra("bloodgroup");
Toast.makeText(getApplicationContext(), text_city + " " + "bloodgrp: " + text_bloodgroup, Toast.LENGTH_SHORT).show();

What could be the problem?

  • 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-05T23:03:52+00:00Added an answer on June 5, 2026 at 11:03 pm

    I think that you must do the:

    intent = new Intent(FindDonor.this,SpecificDonor.class);
    

    before adding extras. Try with:

    intent = new Intent(FindDonor.this,SpecificDonor.class);
    intent.putExtra("city", citySelected.getText().toString());            
    intent.putExtra("bloodgroup", reqd_bloodgrp);
    startActivity(intent);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using one .g file for both lexer and parser. I have the
I'm using Spinner,EditText and Button in one page.The spinner has these items ... Following:
I am using one of snook.ca script for simple slideshow. Here it is in
I have a layout which has one large EditText view at the top +
We are using 2 edittext, one to enter hours and one to enter Minutes.
I have one spinner in which few values are there from strings.xml and I
I am using one label in navigation bar item.In that label two types of
In one of my views, I have three EditText fields. The first two are
I've just started writing my first app. I have EditText field in which i
I'm using the android.text.TextWatcher interface to listen to changes on an EditText in one

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.