Last active
August 29, 2015 14:10
-
-
Save uesteibar/eab8d7485f9d97ad499a to your computer and use it in GitHub Desktop.
Android StartActivity Intent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// on first activity | |
Intent intent = new Intent(getApplicationContext(), ClassName.class); | |
String name = "name"; | |
intent.putExtra("name", name); | |
startActivity(intent); | |
// on second activity | |
Intent intent = getIntent(); | |
name = intent.getStringExtra("name"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment