I am trying to open an activity when user clicks on Notification
. I had issued following Intent
as pending Intent
Intent caseIntent = new Intent(mContext, LoginActivity.class);
caseIntent.putExtra("priority", priority);
caseIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, caseIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_UPDATE_CURRENT);
But when I click on the notification, if the app is not in forground the active which I have specified is not opening at all.
Is something wrong with this Intent
?