title: Android: restore last activity from notification
body: <p>My goal is to return back to last activity if user click in notification.
  I create the notification from in the service onCreate() in this way:</p>
  
  <pre><code>Intent notificationIntent = new Intent(this, MainActivity.class);
  
      notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
      PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
  </code></pre>
  
  <p>but when I click on the notification this go to the MainActivity and not to the last one opened before to click home button.</p>
  
  <p>In manifest I have tried with the MainActivity with launchMode="singleTop", "standard" and "singletask" but without success.</p>
  
  <p>Thank's.</p>