의 클릭 이벤트 내가 알림 표시 줄을 클릭하면, 그것은 MainActivity.class
인터페이스를 건너 뜁니다 자체가 이미 열었습니다알림 표시 줄
Intent notificationIntent = new Intent(context,MainActivity.class); //After click the notification, it will skip to the activity
PendingIntent contentIntent = PendingIntent.getActivity(context,0,notificationIntent,0);
notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
MainActivity.class
경우에, 나는 다시 알림 표시 줄을 클릭, 그것은 두 개의 인터페이스를 보여줍니다. 이 문제를 해결하는 방법을 누가 알 수 있습니까?
Intent notificationIntent = new Intent(context,MainActivity.class);
에 :
이Intent notificationIntent =
new Intent(context,MainActivity.class).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
안드로이드 문서에서 같이 말한다 :