I am using push notifications in Android. When I receive a push notification, I want to open the application if it is still running, else it should open a new instance of it.
I am using
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent,
Intent.FLAG_ACTIVITY_CLEAR_TOP |
Intent.FLAG_ACTIVITY_SINGLE_TOP |
Intent.FLAG_ACTIVITY_NEW_TASK);
But when I receive a push notification now and I click on it, nothing happens.
How can I still achieve this by using flagIntents?