Page 1 of 1

Push notification handler in the app.

Posted: Thu Dec 05, 2013 11:09 pm
by Max Stolbinsky

Hi! I need to add the custom handler for push notifications inside the app. This handler has to read custom field of notification and save it in local storage.
As far as I understood I need to use event 'Push notification' from the main app screen. But it seems this way is not working.
Could you advice how to get it work? thanks!


Push notification handler in the app.

Posted: Thu Dec 05, 2013 11:57 pm
by Igor

Hi,

[quote:]
This handler has to read custom field of notification and save it in local storage.
[/quote]
Please clarify what exactly field do you want to read? Try to use "Push registration success" event.


Push notification handler in the app.

Posted: Fri Dec 06, 2013 8:11 am
by Max Stolbinsky

No, 'Push registration success' is called when push plugin is initialized. I need to handle case when the app received push notification.

Example: app is getting push notification with ID of updated page. We save this id and when user clicks on popup and app opens we check this stored id and open exactly this updated page.

Do you see what i mean?


Push notification handler in the app.

Posted: Fri Dec 06, 2013 10:45 am
by Maryna Brodina

Hello! You receive push message in app on "Push registration success" event. The message itself is in data.aps.alert. Add this event on main app page, in this event check what data you get and decide what you need to do next depending on this data (navigate to the page you need).