How to transfer data from 1 activity to another in android??
help me out??
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Android experts2 reputationPosted Dec 9, 2013, 9:34 PM EST
1st Activity...
Intent it =new Intent(1stactivity.this,2ndactivity.class);
it.putextra("X",value);
startactivity(it);
here value is the data you want to transfer.
2nd Activity...
Bundle bd=getintent().getextras();
if(bd.containskey("X"){
String a=bd.getstring("X");
}
now String a is your transfered value..do wat you want with that!!!!