How to make GCM send messages directly to the app?

I’m developing an app using Ionic 2. This app must receive push notifications. The notifications are sent with GCM and received with Ionic 2 Native Notification plugin.

When the app receives a notification it saves the notification in a database.

When the app is open the notifications are received, saved and shown in the screen.

When the app is in background I receive a message in the notification area of the system and when tap this message it leads to my app and the app receives the message, saves it and show it.

The problem: When the app is in background, if I not tap the message in notification area and open my app the notification is not received by the app. And if I close the message in the notification area of the system by swaping it to the side the notification is lost.

My question is, how can send this notifications directly to the app? Need I change something in the backend/GCM or in the front end?