How To Retrieve data from Bundle data in target activity Passed from source activity
<p>first activity:</p>

<pre><code>    String s="create_newfile";
    Intent i = new Intent("com.monster.android.Showfile");
    Bundle extras = new Bundle();
    extras.putString("task",s);
    i.putExtras(extras);
    startActivity(i);
</code></pre>

<p>second activity:</p>

<pre><code>    Bundle extras = this.getIntent().getExtras();

    String s = extras.getString("task");

    if (extras!=null &amp;&amp; s=="create_newfile")
    {
        setContentView(R.layout.edit);
    }
</code></pre>

<p>its showing error!!!    </p>
