How can I resume my activity when a notification in the statusbar is clicked?
This is the code I have, it shows the notification but when you click it nothing happens:
public void showNotification(){
myNotificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
CharSequence NotificationTicket = "Notification";
CharSequence NotificationTitle = "Notification";
CharSequence NotificationContent = "Test"
long when = System.currentTimeMillis();
Notification notification =
new Notification(R.drawable.status_icon, NotificationTicket, when);
Context context = getApplicationContext();
Intent notificationIntent = new Intent(this,bgPlayer.class);
PendingIntent contentIntent =
PendingIntent.getActivity(this, 0, notificationIntent, 0);
notification.setLatestEventInfo(context, NotificationTitle,
NotificationContent, contentIntent);
myNotificationManager.notify(NOTIFICATION_ID, notification);
}