How to pass data/parameter values from one activity to another in android?
I have used
loginname=txtloginname.getText().toString();
password=txtpassword.getText().toString();
Bundle bundle = new Bundle();
bundle.putString("loginname", loginname);
bundle.putString("password", password);
Intent newIntent=new Intent();
newIntent.putExtras(bundle);
setResult(RESULT_OK,newIntent);
finish();
But I can only get loginname value How to put both login and password key and value?
You can use the method:
You can just say
newIntent.putExtra("name",value);
use it multiple times to add multiple data. And depending on the data you stored callgetStringExtra("name");
in the next activity.