2

If I make for example an

 Intent i = new Intent();
 Bundle b = new Bundle();
 b.putString("Number", spinner.getSelectedItem);
 i.putExtras(b);

So If I want to reach this intent from an another activity, how Can I do this?

Zwiebel
  • 1,605
  • 4
  • 21
  • 37
  • Intents are passed when you start the other activity with `startActivity(i);`. Is that what you need? – Ognyan Jul 07 '11 at 12:36
  • What you are asking is not clear- do you want to access this intent from an activity started with this intent, or from a different activity altogether? – Nathan Fig Jul 07 '11 at 12:40
  • My problem is, that I don't want to start the activity from here. I want to make a settings tab in real, and from it I want to use a spinner, and from it I want to use the selected item in the another activity. – Zwiebel Jul 07 '11 at 13:05
  • Please check below link more helpful to you http://stackoverflow.com/questions/6592441/android-how-to-pass-data-of-one-activity-with-the-button-click-in-another-activi/6592507#6592507 – Nikhil Jul 07 '11 at 12:39

1 Answers1

1

In Android: How do I get variables/data from one screen to another?

In the onCreate in your second activity you would get the string by calling:

getIntent().getStringExtra("Number");
Community
  • 1
  • 1
David Olsson
  • 8,085
  • 3
  • 30
  • 38