In android: I\'m trying to take data from one activity/screen to another.
Let\'s say I\'m adding two numbers. I layout my first screen (xml) with 2 EditText views, a
A sample from my project. We have to use Bundle to get the data.
Use the code in the from/first activity yo set the data. You can set all kind of data types including arrays.
Intent i = new Intent(this, LanguageSetting.class);
i.putExtra("From", 1);
startActivity(i);
How to retrive the data, write the below code in the new/second activity.
Intent myIntent = getIntent();
Bundle b = myIntent.getExtras();
intCameFrom = b.getInt("From");