Page 1 of 2

Navigating to a specific page after clicking a push notification

Posted: Wed Jul 08, 2015 3:34 pm
by Terry Gilliver

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)?


Navigating to a specific page after clicking a push notification

Posted: Wed Jul 08, 2015 5:22 pm
by Evgene Karachevtsev

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.


Navigating to a specific page after clicking a push notification

Posted: Thu Jul 09, 2015 11:29 am
by Terry Gilliver

Thanks


Navigating to a specific page after clicking a push notification

Posted: Tue Sep 05, 2017 1:41 am
by Deon

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?


Navigating to a specific page after clicking a push notification

Posted: Tue Sep 05, 2017 4:11 pm
by Jeffry Reed

Hello,

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

regards,
Jeffry


Navigating to a specific page after clicking a push notification

Posted: Tue Sep 05, 2017 4:20 pm
by Serhii Kulibaba

Hello,

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


Navigating to a specific page after clicking a push notification

Posted: Wed Sep 06, 2017 12:23 am
by Jeffry Reed

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?


Navigating to a specific page after clicking a push notification

Posted: Wed Sep 06, 2017 3:11 am
by Troy Koss

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.


Navigating to a specific page after clicking a push notification

Posted: Wed Sep 06, 2017 8:57 am
by Illya Stepanov

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


Navigating to a specific page after clicking a push notification

Posted: Wed Sep 06, 2017 12:10 pm
by Jeffry Reed

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