I am trying to open an Activity when the notification is clicked and below is my code.
Intent intent = new Intent(this.getApplicationContext(),
Set your pending intent like below
Intent intent = new Intent(this.getApplicationContext(), NotificationActivity.class);
intent.putExtra("msgBody",messageBody);
intent.putExtra(Constants.NOTIF_INTENT_TYPE,Constants.NOTIF_INTENT_TYPE);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
add it to your notification using
.setContentIntent(pendingIntent);