I am building a `notification` for my Music Player, so it displays what music is playing. 
But I want to add a function where, when I touch it. It opens my layout `player.xml`. Which is deployed through the `MainActivity.class`.

I have researched on Notifications on developer.android.com and found a way to deploy and activity upon clicking the notification. But it did't work.

Here is my current code -

```
Notification.Builder builder = new Notification.Builder(getApplicationContext());
                builder.setContentTitle(songsList.get(songIndex).get("songTitle"));
                builder.setContentText("NexPlay™");
                builder.setTicker(songsList.get(songIndex).get("songTitle"));
                builder.setSmallIcon(R.drawable.ic_launcher);
                builder.setSmallIcon(R.drawable.play_default);
                builder.setAutoCancel(true);
                builder.setPriority(0);
                builder.setOngoing(true);           
                Notification notification = builder.build();
                NotificationManager notificationManger = 
                (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);           
                notificationManger.notify(01, notification);

```

Thanks to everyone for answering!

I added 

```
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, NotificationToPlayer.class), 0);
builder.setContentIntent(pendingIntent);

```

to my notifications and it worked great !