How do you pass intent?

Lượng Tiger

New member
How do you pass intent?
Answer
Intent intent = new Intent(getApplicationContext(), SecondActivity. class); intent. putExtra(“Variable name”, “Value you want to pass”); startActivity(intent); Now on the OnCreate method of your SecondActivity you can fetch the extras like this.
 

Tìm kiếm

Back
Top