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)?
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)?
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.
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?
Hello,
you can do this... can you clarify how you have implemented push notifications?
regards,
Jeffry
Hello,
Please search online for an appropriate solution, like:
https://stackoverflow.com/questions/2...
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?
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.
Hi Troy - could you please point out from where exactly you find this?
yeah, my observations and the docs do not have this. I would think what you want is data.additionalData.foreground