开发者

Using intent.getStringExtra from within an activity

开发者 https://www.devze.com 2023-01-01 12:01 出处:网络
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 StringEx

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!


In Activity B:

getIntent().getStringExtra("KEY");


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

0

精彩评论

暂无评论...
验证码 换一张
取 消