/ SDKs / Android
SDKs
Chat SDKs Android v4
Chat SDKs Android
Chat SDKs
Android
Version 4

Retrieve number of members who haven't received a message

Copy link

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
        }
    }
)