Откройте приложение после нажатия на уведомление

В моем приложении есть уведомление со следующим кодом:

//Notification Start

   notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

   int icon = R.drawable.n1; 
   CharSequence tickerText = "Call Blocker";
   long when = System.currentTimeMillis(); //now
   Notification notification = new Notification(icon, tickerText, when);
   Intent notificationIntent = new Intent(context, Main.class);
   PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);

   Context context = getApplicationContext();
   CharSequence title = "Call Blocker";
   text = "Calls will be blocked while driving";

   notification.setLatestEventInfo(context, title, text, contentIntent);

   notification.flags |= Notification.FLAG_ONGOING_EVENT;
   notification.flags |= Notification.FLAG_SHOW_LIGHTS;
   notificationManager.notify(1, notification);

}

Мои уведомления работают очень хорошо, но моя проблема в том, что, когда я нажимаю на уведомление в Центре уведомлений, оно не запускает мое приложение.

В принципе, после нажатия на моё уведомление ничего не происходит! Что я должен сделать, чтобы начать свою Основную деятельность после нажатия на мое уведомление. Благодарю.

Ответы на вопрос(10)

Ваш ответ на вопрос