title: Android Notification Click - don't backstack activity
body: <p>I have a service in background which gives a notification.</p>
  
  <p>I want the next thing:</p>
  
  <p>If I click the notification and the app is not opened open the XActivity.</p>
  
  <p>If the app is opened and the XActivity is created, go there and don't recreate the activity (because if this happen, on back key i will see the same activity again).</p>
  
  <p>My notification code</p>
  
  <pre><code> NotificationCompat.Builder mBuilder =
              new NotificationCompat.Builder(context)
                      .setSmallIcon(R.drawable.ic_launcher)
                      .setContentTitle("New posts!")
                      .setContentText("New funny posts had just arrived! Click here to see them!");
      mBuilder.setAutoCancel(true);
      Intent resultIntent = new Intent(context, XActivity.class);
  
      PendingIntent resultPendingIntent =
              PendingIntent.getActivity(
                      context,
                      0,
                      resultIntent,
                      PendingIntent.FLAG_UPDATE_CURRENT
              );
      mBuilder.setContentIntent(resultPendingIntent);
  
      int mNotificationId = 001;
  </code></pre>
  
  <p>// Gets an instance of the NotificationManager service
          NotificationManager mNotifyMgr =
                  (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
  // Builds the notification and issues it.
          mNotifyMgr.notify(mNotificationId, mBuilder.build());</p>
  
  <p>I start the service from the XActivity. (just a activity name example)</p>
  
  <p>Thank you.</p>