[Solved] Extra from Activity B to Activity A
Write Activity A like this public class MainActivity extends Activity { TextView textView1; Button button1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textView1=(TextView)findViewById(R.id.textView1); button1=(Button)findViewById(R.id.button1); button1.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Intent intent=new Intent(MainActivity.this,SecondActivity.class); startActivityForResult(intent, 2);// Activity is started with requestCode 2 } }); } // Call Back method to get the … Read more