Accessing notification custom data using PushWoosh Cordova plugin

Comments

5 comments

  • Avatar
    Gayview Mahat

    Hello,

    Actually, you can easily pass custom data with your notifications in the { "key": "value" } format. You can do it via both Control Panel (Additional data -> Custom data) and API ("data" section of the createMessage method).

    The custom data would be delivered with the push and processed by your application after user clicks on the notification. It can be set to perform various actions such as displaying the specific screen, launching some activity, etc.

    You can retrieve the custom data with "u" parameter.

  • Avatar
    Willadamskeane

    Right, I'm currently using the custom_data property, but the 'push-notification' event is called regardless of whether or not the user clicks on the notification. I only want an action to be taken if they explicitly tap on the notification.

  • Avatar
    Willadamskeane

    Really need an answer to this one.

  • Avatar
    Willadamskeane

    Anyone else have any suggestions?

  • Avatar
    Max Konev

    Right, I'm currently using the custom_data property, but the 'push-notification' event is called regardless of whether or not the user clicks on the notification. I only want an action to be taken if they explicitly tap on the notification.

    No, it is only called when you tap on the notification. If you launch the app by its icon - no push-notification event triggered. The only way it could be triggered automatically - if your app is in foreground.

Please sign in to leave a comment.