Refer this link :
http://developer.android.com/guide/topics/ui/notifiers/notifications.html#NotificationResponse
First define Activity hierarchy in AndroidManifest.xml for Launcher
activity.Also build your notification as follows :
<activity
android:name=".LauncherActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ResultActivity"
android:parentActivityName=".LauncherActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".LauncherActivity"/>
</activity>
Intent resultIntent=new Intent(this,ResultActivity.class);
TaskStackBuilder stackBuilder=TaskStackBuilder.create(this);
stackBuilder.addParentStack(ResultActivity.class);
stackBuilder.addNextIntent(resultIntent);
PendingIntent resultPendingIntent=stackBuilder.getPendingIntent(0,PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder builder=new NotificationCompat.Builder(this);
builder.setContentIntent(resultPendingIntent);
NotificationManager mNotif`enter code here`icationManager=
(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(id,builder.build());