title: How to call an activity from service with Notification Bar
body: <p>This is my sistuation</p>
  
  <p>A1 = Splash Screen Activity</p>
  
  <p>A2 = Main Activity</p>
  
  <p>A3 = Extra Activity</p>
  
  <p>S1 = GPS Service</p>
  
  <p>I start with A1 that creates intent to launch A2 and then A1 finish.
  Inside A2 I create and bind S1 (Inside S1 I make a Notification)</p>
  
  <pre><code>CharSequence text = getText(R.string.local_service_started);
  
  Notification notification = new Notification(R.drawable.notify_icon, text, System.currentTimeMillis());
  
  Intent i = new Intent();
  i.setClassName("xxx.yyy.zzz.kkk", "xxx.yyy.zzz.kkk.A2");
  i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
  
  PendingIntent contentIntent = PendingIntent.getActivity(this, 0, i, PendingIntent.FLAG_UPDATE_CURRENT);
  
  notification.setLatestEventInfo(this, getText(R.string.local_service_label), text, contentIntent);
  mNM.notify(NOTIFICATION, notification);
  </code></pre>
  
  <p>Now I have my icon in the notification bar
  If I press HOME button inside my A2 activity and open another application and then I press my notification icon all is working correctly and I gate back my A2 activity(A2 is the top most activity), but if inside A2 I launch A3 and go back HOME and press the notification I have the problems, A2 is created as a new instance(A2 now isn't top most)! Is possible to have the effect like long press HOME and focus the last open activity inside my application? I don't want to open a specific activity, but bring to front my paused activity without a new instance of the activity.</p>