I'm using net.iamyellow.gcmjs
module for notification push (android), I want to open a window automatically when I receive push notification (even my app in background), without user interaction.
GCM's only role in this process is to send a payload coming from your app server to the GCM connection server then into your client app (device). What you do with the payload on the client side is totally up to you.
But what is commonly used in order to show the user when a push notification is received is by showing a Notification. You can try out the GCM Android Quickstart in order to get the gist.
In the code that you will be downloading (if ever you decided to try the quicstart), the MyGCMListenerService
(responsible for listening when a push notification is sent to the device) it has the sendNotifcation()
function which generates a Notification
for the user to see.
Here's about Building a Notification. Do try it out. GCM is fun and vast. Cheers! :D