I know how to pass one string from one activity to another, but how would you do this for two strings "nameString" and "addressString"?
add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
addressString = address.getText().toString();
nameString = name.getText().toString();
Intent intent = new Intent(AddLocationActivity.this, MapsActivity.class);
intent.putExtra("address", addressString);
AddLocationActivity.this.startActivity(intent);
}
});
this way you can pass and retrive string from one activity to another activity
retrive String to MapsActivity
Hope it will help you :)
Similar the way u passed 1st string u can pass 'n' number of strings via intent.
To pass:
To get: