title: Android intent.getStringExtra() return null
body: <p>MainActivity    </p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
              private static final int REQ_CODE_TO_ADD = 123;
              final ArrayList&lt;Contact&gt; allContact = new ArrayList();
              ArrayList&lt;String&gt; name = new ArrayList();
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      final Intent intent = new Intent(this,DetailActivity.class);
      Button addbt = (Button)findViewById(R.id.addbt);
  
  public void onClickAdd(View v){
      Intent intent = new Intent(this,AddContactActivity.class);
      startActivityForResult(intent,REQ_CODE_TO_ADD);
  }
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      if(requestCode == REQ_CODE_TO_ADD){
          if(resultCode == 0){
              Intent intent = getIntent();
              String name2 = intent.getStringExtra("namev");
              String email2 = intent.getStringExtra("emailv");
              String birthday2 = intent.getStringExtra("birthdayv");
  
              Log.d("AAA","&gt;&gt;&gt;:"+name2);
  
              Contact person = new Contact(name2,email2,birthday2);
              allContact.add(person);
          }}
  }
  }
  </code></pre>
  
  <p>AddContactActivity</p>
  
  <pre><code>public class AddContactActivity extends AppCompatActivity {
  private static final int REQ_CODE_TO_MAIN = 321;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_add_contact);
  }
  
  public void onClickOk(View v){
      EditText name = (EditText)findViewById(R.id.nameet);
      EditText email = (EditText)findViewById(R.id.email);
      EditText birthdate = (EditText)findViewById(R.id.birthdate);
  
      Intent intent = new Intent();
      intent.putExtra("namev",name.getText().toString());
      intent.putExtra("emailv",email.getText().toString());
      intent.putExtra("birthdayv",birthdate.getText().toString());
      setResult(0,intent);
      finish();
  }
  }
  </code></pre>
  
  <p>AddContactActivity I already use intent.putExtra name.getText().toString() and send intent to MainActivity</p>
  
  <p>Why onActivityResult() in MainActivity Log.d output is null?</p>