How to connect one android activity to other? : <p>I am trying to do something like, when I click on "Button_Set" Button on <strong>Activity 1</strong>, it should set the <strong>Edit Box</strong> of <strong>Activity 2</strong>.
I know the below code gives the Null pointer exception and is expected to not work.</p>

<p>Any Idea how do I do this?</p>

<pre><code>order.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(Activity1.this,Activity2.class));
                setorder.setText("Welcome User");

           }
  });
</code></pre>
