mehtashail
Posts: 0
Joined: Tue Feb 04, 2014 1:29 am

Redirect to specific screen on different push notifications.

I would like to redirect the app to a specific screen based on the push notification. For e.g. If the notification is "How are you doing today?" direct them to Screen X. If the notification is - "This is your daily reminder", direct them to Screen Y.

Is that feasible?

thanks

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Redirect to specific screen on different push notifications.

Hello Mehtashail,

Yes, you should hang the appropriate js code for Push notification event.

mehtashail
Posts: 0
Joined: Tue Feb 04, 2014 1:29 am

Redirect to specific screen on different push notifications.

Evgene,
I should clarify the case I am talking about is when the user is not within the application. I thought the push notification event is only for when the user is within the app correct?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Redirect to specific screen on different push notifications.

Hi mehtashail,

Yes, push will work even when your app even not goes by this time..

But if user click on this certain push the app will loaded and push event will fire inside the app. And then you can handle this event and make logic you need(for example navigate to certain page).

Regards.

mehtashail
Posts: 0
Joined: Tue Feb 04, 2014 1:29 am

Redirect to specific screen on different push notifications.

Is there a way for me to know if the push notification event was triggered when the user is in the app or outside?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Redirect to specific screen on different push notifications.

Hi mehtashail,

Here is no direct way to do it.

But you can listen to following events and make logic you need:

1 "pause" triggers when app goes to pause. http://docs.phonegap.com/en/3.0.0/cor...

2 "resume" triggers when app goes from pause. http://docs.phonegap.com/en/3.0.0/cor...

Regards.

Return to “Issues”