title: android application crashes as I pass string to another activity
body: <p>so here is another basic problem i'm having...my application crashes as i try to pass a string to another activity. i have tried a few ways but in vain. here's the code</p>
  
  <p>Main Activity named Main.java</p>
  
  <pre><code>package com.ammad.test;
  
  import android.os.Bundle;
  import android.os.Handler;
  import android.app.Activity;
  import android.content.Intent;
  import android.view.View;
  import android.widget.Button;
  import android.widget.TextView;
  
  public class Main extends Activity {
  
      TextView tv;
      Button b1;
  
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          tv = (TextView) findViewById(R.id.tvShow);
          b1 = (Button) findViewById(R.id.bt1);
          b1.setOnClickListener(new View.OnClickListener() {
  
              public void onClick(View arg0) {
                  // TODO Auto-generated method stub
                  Bundle basket = new Bundle();
                  String myScore = "testing";
                  basket.putString("key", myScore);
                  Intent intent = new Intent(Main.this, Second.class);
                  intent.putExtras(basket);
                  startActivity(intent);
  
  
              }
          });
  
  
      }
  }
  </code></pre>
  
  <p>Second class to which the data is passes named Second.java</p>
  
  <pre><code>package com.ammad.test;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.widget.TextView;
  
  public class Second extends Activity{
  
      TextView tv;
      String getScore;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.second);
          tv= (TextView) findViewById(R.id.tvRes);
          Bundle gotBasket = getIntent().getExtras();
          getScore = gotBasket.getString("key");
          tv.setText(getScore);
      }
  
  }
  </code></pre>
  
  <p>and finally the manifest file:</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.ammad.test"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="15" /&gt;
  
      &lt;application
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name=".Main"
              android:label="@string/title_activity_main" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity
              android:name=".Sec"
              android:label="@string/title_activity_main" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="com.ammad.test.SECS" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>