how to get values from previous activity
<p>hi all
in second activity i set some values and how to bring into first activity. i use Bundle for bring data. NullPointerException error is getting.</p>

<p>in secondactivity:</p>

<pre><code>    c1.setOnClickListener(new View.OnClickListener() 
    {
        public void onClick(View view) 
        {
            c1.setChecked(true); 
            Bundle bundle = new Bundle();
            bundle.putString("key1",String.valueOf(c1.getText()));
            Intent myIntent = new Intent(view.getContext(), main.class);
            myIntent.putExtras(bundle);
            startActivityForResult(myIntent, 0);
        }

    });
</code></pre>

<p>in first(main) activity:</p>

<pre><code>    Bundle bundle = this.getIntent().getExtras();
    check = bundle.getString("key1"); // NullPointerException.
</code></pre>

<p>please assist me.</p>
