Skip to content Skip to sidebar Skip to footer

When I Click On Notification In Status Bar, Application Is Not Launching

I try to develop an application which use GCM library, but when I click on notification in status bar, application is not launching... Here is my source code in my GCMIntentService

Solution 1:

You are trying to launch LauncherActivity.class right?

Remove the line:

notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);

Try to add the flags in the PendingIntent

PendingIntent pintent = PendingIntent.getActivity(context, 0, intent, Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);

Post a Comment for "When I Click On Notification In Status Bar, Application Is Not Launching"