Community

Community Forums

Where our customers, developers, and more can come together to help each other with both general and technical questions about our products and services.

Push Notification & Message Center with custom message center

James Outterside

I've created a custom message center that lists the messages in order etc which is all working fine. My next step is to deep link the push notificaiton to this message center when received, but I'm having trouble distinguishing between a normal push notification sent and the push notifications sent with a message center message.

I've tried playing around with the onNotificationOpened(..) callback but can't distinguish between a normal push notificaiton and a push notification + message center in a reliable way.

Please sign in to leave a comment.

0
Avatar

Hello James,

One way you could do this is checking the message payload for a Message Centre message ID in the onPushReceived method, sort of like this:

        if(pushMessage.getRichPushMessageId() != null){
            containsMessageCentre = true;
        }

I hope this is of help to you, but let me know if you have any further questions.

Kind regards,

Chilun Liu

Airship Support

chilun liu 0 votes
Comment actions Permalink
0
Avatar

Maybe you can have a nested condition that checks "onPushReceived()" then within that, check for getRichPushMessage() != null ?

chilun liu 0 votes
Comment actions Permalink