Android notification

Hi,

I used GCM for android notification. when I open my app and sent this notification >> I can receive it by "
push.onReceivedMessage = function(payload) { "

but when I close my app and receive notification on list of notifications … I click on it but I can’t go to exactly uri in my app . open init page of my app . I can’t receive it by
push.onReceivedMessage = function(payload) { "

How I can solve it ? when click on notification go to exactly uri in my app ?

Thanks,

You need to put the push.on() subscription in a JavaScript file that is very close to the root of your app and gets executed during app startup. And you need to handle local app navigation yourself.

So when you receive a particular push notification in push.on(), you have to parse it yourself and decide where to navigate the user to.

Thanks for reply but …

I need to handle notification when my app is closed . I put this
" push.on(“receivedMessage”, function(payload) {"
and I can handle notification when received it during my app is open .

Still problem when I click on notification received when my app is closed ! how I can handle it ? as this photo I need to click on it – handle it How ?

After your app launches, that notification you clicked on will be delivered to that same push.on("receivedMessage") listener. That’s where you handle it.