Use Intent.FLAG_ACTIVITY_NEW_TASK
instead of 0
for flag.
Replace
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);
with
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, Intent.FLAG_ACTIVITY_NEW_TASK);