I have a code in the service:
Intent intent = new Intent(this,ActivityFragments.class); intent.putExtra("ExamFragment","ExamFragment"); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this,0,intent,0); mBuilder.setContentIntent(pendingIntent); mBuilder.setSmallIcon(R.drawable.icon); mBuilder.setContentTitle("Уведомление"); mBuilder.setContentText("Вам нужно срочно проверить результаты"); mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); mNotificationManager.notify(001, mBuilder.build()); This code triggers a notification. How do I do this: Write a key in PendingIntent and transfer its activity (when you click on the notification), and accordingly get it?