How to handle status bar notification?

view story

http://stackoverflow.com – I have three screens like login,second and third. Based on my conditions i generate a status bar notification. If user click the notification i want to show third screen. It is working fine. But when i restart the app directly third screen is coming. I want to display third screen when notification is clicked. Other wise my first screen should be the login page. I can display notification by using the following code public void showNotification() { NotificationManager notificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); Notification notifica (HowTos)