I have GCMIntentService implemented and whenever i get the push notification i need to show the notification in notification menu and open an activity with some bundle values in the intent. I can see the notification in the notification menu but clicking on it just doesn't do anything. Following is the code which i am using :-
mNotificationManager = (NotificationManager)
this.getSystemService(Context.NOTIFICATION_SERVICE);
Intent i = new Intent(this, ChatDetail.class);
Bundle b = new Bundle();
b.putString("my_id", "5356b178b130a74a57019fe9");
b.putString("you_id", youId);
i.putExtras(b);
// PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
// new Intent(this, MainActivity.class), 0);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
i,PendingIntent.FLAG_CANCEL_CURRENT );
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.pool_my_ride_icon)
.setContentTitle("GCM Notification")
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(text))
.setContentText(text);
mBuilder.setContentIntent(contentIntent);
mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
I can see the notification but when i click on it the notification menu slides up and doesn't do anything doesn't opens any activity. If i don't send any bundle in the extras then i can open the activity but when i send bundle values then i can't open the activity.
Thanks in advance