Notification class not loading
<p>I have just started experimenting on android. I am reading book Beginning Android 4 application development by Wrox pulication. There is a code for showing notifications. The problem is the code I have written(not copied) is very little modified. So, I am able to show notification on status/notification bar but on clicking the notification the notificaion class is not being invoked. Here is the code for android_mainfest first.</p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="legacy_systems.notificationproject"
android:versionCode="1"
android:versionName="1.0" &gt;

&lt;uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="9" /&gt;
&lt;uses-permission android:name="android.permission.VIBRATE"/&gt;

&lt;application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" &gt;
    &lt;activity
        android:name="legacy_systems.notificationproject.MainActivity"
        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="Notification"
        android:label="Details of the Notification" &gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;                    
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
&lt;/application&gt;

&lt;/manifest&gt;
</code></pre>

<p>Now, the code for MainActivity
package legacy_systems.notificationproject;</p>

<pre><code>import android.os.Bundle;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.view.View;
import android.app.Activity;
import android.view.Menu;

public class MainActivity extends Activity {
int notificationID = 1;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
}

public void onClick(View V)
{
    getNotification();
}

protected void getNotification()
{
    Intent i = new Intent(this, Notification.class);
    i.putExtra("notificationID", notificationID);
    PendingIntent pn = PendingIntent.getActivity(this, 0, i, 0);
    NotificationManager nm= (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
    Notification n = new Notification(R.drawable.ic_launcher,
                                      "Reminder! Meeting starts in 5 Minute",
                                      System.currentTimeMillis());
    CharSequence from = "System Alarm";
    CharSequence message = "Meeting with customer in next 2 minute";
    n.setLatestEventInfo(this, from, message, pn);
    n.vibrate = new long[]{ 100,250,50,500};
    nm.notify(notificationID, n);       
}

}
</code></pre>

<p>And, the code for Notification.java is
    package legacy_systems.notificationproject;</p>

<pre><code>import android.app.Activity;
import android.os.Bundle;
import android.app.NotificationManager;
import android.util.Log;

public class Notification extends Activity{
String tag;

public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    Log.d(tag,"In here");

    setContentView(R.layout.notification);

    NotificationManager nm = (NotificationManager)getSystemService(VIBRATOR_SERVICE);
    nm.cancel(getIntent().getExtras().getInt("notificationID"));
}
}
</code></pre>

<p>And activity_main.xml is, </p>

<pre><code>&lt;xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" &gt;

&lt;Button
    android:id="@+id/btn"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent"
    android:text="@string/getnot"
    android:onClick="onClick"
 /&gt;

&lt;/RelativeLayout&gt;    
</code></pre>
