I have a Two Activities Activity-A and Activity-B, And I pass the Value from Act-A to Act B using an Intent. Everything is working good. When I open my Act-B I get Value from Act-A, Now the Problem is when click the Back Button (Twice) then only i get my Act-A. when i press once same activity it done not Navigate me on my Act-A.
Act-A:
btn_add_city.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// Launching Add_City Screen
Intent i = new Intent(getApplicationContext(),
Acti-B.class);
startActivity(i);
passmyValue();
}
});
public void passmyValue(){
intent = new Intent(getApplicationContext(),Act-B.class);
intent.putExtra("name", receive.getText().toString());
startActivity(intent);
}
Act-B:
receive = (TextView)findViewById(R.id.userHidden);
receive.setText(getIntent().getStringExtra("name"));