Chat / Android
Chat Android v4
Chat Android
Chat
Android
Home
/
Chat
/
Android
/
Message
This is the new Docs for Chat SDK v4 for Android. To see the previous Docs, click here.

Retrieve number of members who haven't received a message

You can retrieve the number of members who haven’t received a specific message in a group channel. When the value of 0 is returned, it means that the message has been successfully delivered to all members in the channel.

SendbirdChat.addChannelHandler(
    UNIQUE_HANDLER_ID,
    object : GroupChannelHandler() {
        override fun onMessageReceived(channel: BaseChannel, message: BaseMessage) {
            // ...
        }

        override fun onDeliveryStatusUpdated(channel: GroupChannel) {
            val isAllDelivered = channel.getUndeliveredMemberCount(message) == 0
        }
    }
)