4

I am relatively new to android. I have two applications A and B. I have an activity in A, lets name it x, that would launch the application B. Now the intent sent by x contains StringExtra that I want the Starting activity in B to use. Is there a way for the activity in B to do that?

Thanks!

Lakshmie
  • 331
  • 6
  • 17

2 Answers2

3

In Activity B:

getIntent().getStringExtra("KEY");
Vishal Yadav
  • 3,642
  • 3
  • 25
  • 42
jasonhudgins
  • 2,815
  • 1
  • 25
  • 20
2

Just use Intent#getExtras() and then Bundle#getString()

RoflcoptrException
  • 51,941
  • 35
  • 152
  • 200