1.open from notification bar
2.press home return to desttop
3.open from app icon
problem:2 instance of SampleTabsDefault, need to exit twice.
Intent intent = new Intent(_context, SampleTabsDefault.class);
intent.setFlags(/*Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP |*/ Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent activity = PendingIntent.getActivity(_context, 0, intent, 0);
notification.contentIntent = activity;
Try below code in AndroidMenifest.xml file within your activity nod.
Please read both attributes description here.
Hope this will solve your problem