title: Android: When notification is clicked how to come back to same app?
body: <p>I know the title is not explanatory but let me explain it to you. I'm working on a Shoutcast streaming radio project. When the app starts to stream a notification appears on the notification bar with the name of radio and the current song id. So far everything seems normal, however when the user touches on the notification (while stream continues) it opens app again and another stream starts to play. I hope I have explained the problem well and here is the code: </p>
  
  <p>EDIT: </p>
  
  <pre><code> Hey again, I have just figured out how to make it that way and here is the sample code.
  
  
      String ns = Context.NOTIFICATION_SERVICE;
      mNotificationManager = (NotificationManager) getSystemService(ns);
  
      icon = R.drawable.rbnot;
      CharSequence tickerText = "Radyo Bilkent";
      long when = System.currentTimeMillis();
  
      notification = new Notification(icon, tickerText, when);
      notification.flags = Notification.FLAG_ONGOING_EVENT | Notification.FLAG_NO_CLEAR;   
      Intent notificationIntent = new Intent(this, myMain.class);
      notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
  
      Context context = getApplicationContext();
      CharSequence contentTitle = "Radyo Bilkent";
      CharSequence contentText = currPlayView.getText();
  
      PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
  
      notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
  
      mNotificationManager.notify(HELLO_ID, notification);
  </code></pre>