I’m making a game where I have to integrate notifications android GCM.

The notification system is created, and if I get a notification when the application is closed everything is working properly.But if I get a notification when the application is open, pendingIntent class opens a new intent (NotificationActivity) that closing a black screen appears.

I searched google any example that integrated notification system GCM, but found nothing.