При нажатии вызываю активити со списком чатов, но создается новая копия активити и при нажатии на ней Back появляется предыдущая из стэка.
Можно ли как-то вызывать существующую вместо создания новой?
Код:
Код: Выделить всё
public void NotifyNow(String tickerText, String contentTitle, String contentText) {
long when = System.currentTimeMillis();
Notification notification = new Notification(R.drawable.ntf_icon, tickerText, when);
Intent notificationIntent = new Intent(context, ActivityChats.class);
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);
notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
notification.flags = Notification.FLAG_AUTO_CANCEL;
int NotificationID = nit_ID; // int
notificationManager.notify(NotificationID, notification);
}