I am trying to open an Activity when the notification is clicked and below is my code.
Activity
Intent intent = new Intent(this.getApplicationContext(),
Check this code and let me know.
Intent intent = new Intent(this, LoginActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_ONE_SHOT);