Get push message content without open the notification

Comments

4 comments

  • Avatar
    Alexander Spotar

    If a user ignored the push notification or cleared it from the notification center, and opened the application directly by tapping the icon, then you will not have any mean to get that notification payload.

  • Avatar
    Alexander Spotar

    Please note that when asking a question, you should specify tags related to the question (i.e. your target platform, api method, issue keywords, etc.). Tags are intended to help community members answer and locate your queries, please be so kind to edit the question.

  • Avatar
    askeypuah

    Hi,

    Thanks for your clarification. So the conclusion is the only way my program can get the content of the push message is when the user open the notification. No other way right?

    Puah.

  • Avatar
    Alexander Spotar

    Either when the app is launched from the notification, or when the push is received when the application is already running in the foreground/background.

    I suggest looking into the following thread on stackoverflow: http://stackoverflow.com/questions/12116282/handling-push-notifications-when-app-is-not-running?rq=1 The author has pretty much the same question, and he gives quite a detailed explanation.

Please sign in to leave a comment.