title: using intent on android to show activity
body: <p>I have two <code>activity</code> classes. I have a button on the first one and I want to show the second when it is clicked, but I get <strong>force close</strong> when  ever i run the application. Here are the classes:</p>
  
  <pre><code>public class APP extends Activity {
  
      private TextToSpeech tts;
      private Button b1,b1a,b2,b2a,b3,b3a; 
  
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          /** Called when the activity is first created. */
          setContentView(R.layout.main);
          tts = new TextToSpeech (this, null);
          b1 = (Button)findViewById(R.id.btn_time);
          b1.setOnLongClickListener(new Button.OnLongClickListener(){
  
  
              @Override
                 public boolean onLongClick(View arg0) {
                  String hi = "Time";
                  tts.speak(hi, 0, null);
  
                  return false;
              }});
  
              b1a = (Button)findViewById(R.id.btn_time);
              b1a.setOnClickListener(new Button.OnClickListener(){
  
              public void onClick(View arg0){
              {
  
                  Intent i = new Intent(APP.this, Time.class);
                  startActivity(i);
              }
            }
         });
  </code></pre>
  
  <p>and to link it to :</p>
  
  <pre><code>public class Time extends Activity {
      @Override
      public void onCreate(Bundle savedInstanceState) 
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.time);
          Button btn = (Button) findViewById(R.id.imageButton1);
  
          btn.setOnClickListener(new View.OnClickListener()
          {
              public void onClick(View view) {
                  Intent data = new Intent();
                  TextView txt_username = 
                      (TextView) findViewById(R.id.imageButton1);
  
                  data.setData(Uri.parse(
                          txt_username.getText().toString()));
  
                  setResult(RESULT_OK, data);
                  finish();
              }
          });
      }
  }
  }
  </code></pre>
  
  <p>There are no errors with the codes, it only force closes when the button is pressed.
  I even added the <em>time class</em> to <code>manifest</code>, but the problem still persist. Is there anyway to solve this problem? thanks in advance. :D</p>
  
  <hr>
  
  <p>this is my current manifest. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.learn2develop.APP"
    android:versionCode="1"
    android:versionName="1.0"&gt;
  &lt;uses-sdk android:minSdkVersion="8" /&gt;
  
  &lt;application android:icon="@drawable/icon" 
              android:label="@string/app_name"&gt;
  
      &lt;activity android:name=".APP"
                android:label="@string/app_name"&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=".Time"
                  android:label="@string/app_name"&gt;
      &lt;intent-filter&gt;
      &lt;action android:name="android.intent.action.TIME" /&gt;
       &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt; 
        &lt;/activity&gt;
          &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>But, the problem still persist. it force closed after i press the button to link to time activity. and when i check up the <code>logcat</code>, it says: </p>
  
  <pre><code>07-13 14:25:56.384: ERROR/AndroidRuntime(3799): android.content.ActivityNotFoundException: Unable to find explicit activity class {net.learn2develop.APP/android.text.format.Time}; 
  </code></pre>
  
  <p>Have you declared this activity in your <strong>AndroidManifest.xml?</strong></p>