当我点击通知栏时,它会跳过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
本身已经打开,我再次点击通知栏,它显示两个界面。谁知道如何解决这个问题?