Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

Navigating to a specific page after clicking a push notification

When you click on a push notification, it open the app. Is it possible from the app to find out if it was started by a push notification (This would allow my app to navigate to a news page for extra info on the notification)?

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

Navigating to a specific page after clicking a push notification

Terry,

Unfortunately this question is outside the scope of our support, because opening of the app depends of the device logic. Most likely this is impossible.

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Navigating to a specific page after clicking a push notification

Has anyone figured this out. This is standard practice. When clicking on a push notification you should be able to go to a specific page in the app.

Most apps allow this. Surely this is an Appery issue and NOT outside Scope of support?

Jeffry Reed
Posts: 0
Joined: Sun Aug 14, 2016 3:59 pm

Navigating to a specific page after clicking a push notification

Hello,

you can do this... can you clarify how you have implemented push notifications?

regards,
Jeffry

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Navigating to a specific page after clicking a push notification

Hello,

Please search online for an appropriate solution, like:
https://stackoverflow.com/questions/2...

Jeffry Reed
Posts: 0
Joined: Sun Aug 14, 2016 3:59 pm

Navigating to a specific page after clicking a push notification

Hello Serhii,

I don't think your suggestion is what they are looking for, but i could be wrong. I think what they are referring to is when they click on device notification when notification is received when app is not in foreground.

Deon, can you clarify, I am understanding correctly?

Troy Koss
Posts: 0
Joined: Fri Feb 05, 2016 2:59 am

Navigating to a specific page after clicking a push notification

It's in the docs:

Add this to your index.html page of your app in the init()

document.addEventListener("push-notification", function (event) {

Code: Select all

 if(event.detail && event.detail.additionalData && event.detail.additionalData.route){ 
     // do stuff 
 } 

});

Only problem I have is that when I type in Apperyio.navigateTo("route"), the route doesn't load.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Navigating to a specific page after clicking a push notification

Hi Troy - could you please point out from where exactly you find this?

Jeffry Reed
Posts: 0
Joined: Sun Aug 14, 2016 3:59 pm

Navigating to a specific page after clicking a push notification

yeah, my observations and the docs do not have this. I would think what you want is data.additionalData.foreground

Return to “Issues”