I really find this weird, I'm able to get other values except one. Here's my code:
Intent intent = new Intent(this.context, SecondActivity.class);
intent.putExtra("contact", n.getContact());
intent.putExtra("email", n.getEmail());
intent.putExtra("address", n.getAddress());
intent.putExtra("test", "hello world");
context.startActivity(intent);
And this is the code where I'll get the values under OnCreate():
Intent intent = getIntent();
contact = intent.getStringExtra("contact");
email = intent.getStringExtra("email");
address = intent.getStringExtra("address");
test = intent.getStringExtra("test");
Everything works well except for the String test
. It will always give me null value. Any solution for this?
Question added: Does intent.putExtra() doesn't accept quoted text anymore on the second parameter? LOL