title: Resume application by clicking notification from a service
body: <p>I successfully created an activity which starts a service which by turn shows a notification like this</p>
  
  <pre><code>public int onStartCommand(Intent intent, int flags, int startId){
  
  String notificationText = "working"
          myNotification = new NotificationCompat.Builder(getApplicationContext())
                  .setContentTitle("test")
                  .setContentText(notificationText)
                  .setTicker("Notification!")
                  .setWhen(System.currentTimeMillis())
                  .setDefaults(Notification.DEFAULT_SOUND)
                  .setAutoCancel(true)
                  .setSmallIcon(R.drawable.ic_launcher)
                  .build();
  
  //FOLLOWING TECHNIQUE IS DEPRECATED
   /* PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, 0);
      myNotification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); */
  
          myNotification.flags |= Notification.FLAG_NO_CLEAR;
          myNotification.flags = Notification.FLAG_ONGOING_EVENT;
          notificationManager.notify(1, myNotification);
  
          return START_STICKY; 
  }
  </code></pre>
  
  <p><strong>I know there are other questions related to this one BUT they all use <code>setLatestEventInfo</code> which is deprecated</strong></p>
  
  <p>And this is what I call from another activity:</p>
  
  <pre><code>protected void beginBackgroundSer(){
  
          intentService = new Intent(this, Service.class);
          intentService.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
          this.startService(intentService);
  
      }
  </code></pre>
  
  <p>So what I'd like is to <strong>resume</strong> the activity whenever I click the notification by non-deprecated methods. Thank you very much for your help.</p>