Thanks.
Sorry for misunderstanding Joe
[quote:]That doesn't seem to work because data.aps.alert only has something in it if you received the push notification while inside of the application.[/quote] we had this bug and it has been fixed for Android some time ago.. We need to test it again and unfortunately it might take time. Someone will get back as soon as possible with update.
Perhaps there is the same issue with iOS apps.
Hello! It works on Android device, but there is a bug on iOS devices unfortunately. We'll fix it as soon as possible.
I would like to take the user directly to a specific page on receipt of a push message. Your suggestion above :-
var pageName = data.aps.alert;
Appery.navigateTo(pageName);
works but it means that the push message, as shown in the initial Android notification, shows the page name which is not very user friendly. I would like the message to show in the notification as usual but still force the user to the specific page. Is this possible?
Also has anyone come up with a way of opening the app directly a push arrives without having to click the notification first?
Hello!
1) "opening the app directly a push arrives without having to click the notification first" - I don't think it's possible
2) use if or switch to define where to redirect userprevar message = data.aps.alert, pageName = '';
switch(message){
case "My friendly message 1": pageName = "pageName1"; break;
case "My super friendly message 2": pageName = "pageName2"; break;
case "Just friendly message 3": pageName = "pageName3"; break;
}
if (pageName) {
Appery.navigateTo(pageName);
}/pre
Maryna,
Thanks, you've given me some ideas on how to solve my problem.
How to automatically push in background? I'm on the standard plan which refreshes code every 15 minutes.
This doesn't answer how the reciever of the push notification will call these lines which perform a switch statement according to message type and deeplink location.
Thoughts? Thanks in advance if you would provide sample code/examples.
You can schedule your push notifications: https://devcenter.appery.io/documenta... or execute a Server side script for sending push messages.
You can use only JavaScript modification as shown in example above.