Skip to content

Message seen status

Luka Ilić edited this page Oct 25, 2023 · 14 revisions

Any message sent to the end user can have a seen status, it can be either seen or not seen. You can enrich analytics and statistics of sent messages by using Seen status in your mobile application. MM SDK will by default mark messages as seen if user taps on notifications.

To manually mark a particular message as seen, call setMessagesSeen() method of MobileMessaging with an array containing IDs of messages that you want to mark as seen:

var message1: Message
var message2: Message
...

MobileMessaging.getInstance(context).setMessagesSeen(message1.messageId, message2.messageId)
expand to see Java code

Message message1;
Message message2;
...

MobileMessaging.getInstance(context).setMessagesSeen(message1.getMessageId(), message2.getMessageId());

Mobile Messaging SDK will automatically deliver the status change to the server.

Receiving seen reports status

You can receive seen reports status if you register BroadcastReceiver for seen status as described in SEEN_REPORTS_SENT event.

Marking message as seen on notification tap

Mobile Messaging SDK will automatically update delivery status to the server. Library will also mark messages as seen if user taps on such notifications. If you want to disable this behaviour and do not mark messages as seen on notification tap, use "withoutMarkingSeenOnNotificationTap()" method during initialization.

MobileMessaging.Builder(application)
        .withoutMarkingSeenOnNotificationTap()
        .build()
expand to see Java code

new MobileMessaging.Builder(application)
        .withoutMarkingSeenOnNotificationTap()
        .build();
Clone this wiki locally