Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#android Transfer data between activities
//First activity (ActivityA). The data is in editText (et1)
Intent i = new Intent(this, ActivityB.class);
i.putExtra("textByUser", et1.getText().toString());
//Second activity (ActivityB). Get data
Bundle bundle = getIntent().getExtras();
String data = bundle.getString("textByUser");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment