title: PendingIntent wont launch desired fragment
body: <p>I'm trying to use <code>PendingIntent</code> in the same activity. If the <code>MainActivity</code> is already running and the app receives a notification, when this notification is clicked it should load the <code>TestFragment</code> Class but that is not the case here, When notification is clicked nothing happens.</p>
  
  <pre><code>    Intent intent = new Intent(mContext, MainActivity.class);
      intent.putExtra("NOTIFICATION", "notify");
      intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
      intent.setAction(Long.toString(System.currentTimeMillis()));
      intent.setAction(Intent.ACTION_MAIN);
      intent.addCategory(Intent.CATEGORY_LAUNCHER);
      PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 100, intent, PendingIntent.FLAG_UPDATE_CURRENT);
  
      NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
      Notification notification = new NotificationCompat.Builder(mContext)
           .setContentIntent(pendingIntent)
           .setContentTitle(title)
           .setSmallIcon(R.drawable.logo)
           .setLargeIcon(bitmap)
           .setPriority(Notification.PRIORITY_MAX)
           .build();
      notification.flags |= Notification.FLAG_AUTO_CANCEL;
      notificationManager.notify(1, notification);
  </code></pre>
  
  <p>But when I just use this code for the <code>Intent</code> and <code>PendingIntent</code>, I get to load the <code>TestFragment</code> however it creates the activity twice. It loads the TestFragment on top of the default view.</p>
  
  <pre><code>   Intent intent = new Intent(mContext, MainActivity.class);
     intent.putExtra("NOTIFICATION", "notify");
     PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 100, intent, PendingIntent.FLAG_UPDATE_CURRENT);
  </code></pre>
  
  <p>MainActivity.class onCreate()</p>
  
  <pre><code>String notificationIntent = getIntent().getStringExtra("NOTIFICATION");
  
     if(notificationIntent != null) {
         if (notificationIntent.equals("notify")) {
             TestFragment fr = new TestFragment();
             FragmentManager fm = getFragmentManager();
             FragmentTransaction fragmentTransaction = fm.beginTransaction();
             fragmentTransaction.replace(R.id.frame_container, fr);
             fragmentTransaction.commit();               
         }
     } else {
       //default view
     }
  </code></pre>