Unable to pass values between Activities in Android
<p>I am using 2.3.3 version of the Android SDK and I'm trying to pass data between two activities using the following code</p>

<pre><code>Intent myIntent = new Intent(MainAct.this, FriendsActivity.class);
myIntent.putExtra(USER_NAME, ((EditText)findViewById(R.id.username)).getText());
MainAct.this.startActivity(myIntent); 
</code></pre>

<p>In the <code>FriendsActivity</code> i'm retrieving the value using </p>

<pre><code>Bundle b = getIntent().getExtras();
String user = b.getString(MainAct.USER_NAME);  
</code></pre>

<p>But the <code>user</code> is null after these lines are executed. Not sure whats wrong here. Read similar questions on SO <a href="http://goo.gl/zOJfa" rel="nofollow">http://goo.gl/zOJfa</a> but still the problem continue to be seen.</p>
