Chat / Android
Chat Android v4
Chat Android
Chat
Android
Version 4
Home
/
Chat
/
Android
/
Message

Close a poll

You can close a poll by specifying the pollId in the closePoll() method.

fun closePoll(channel: GroupChannel, pollId: Long) {
    channel.closePoll(pollId) { poll, e ->
        if (e != null) {
            // Handle error.
        }

        // The poll has been successfully closed.
    }
}

PollHandler

Through PollHandler, the Sendbird server always notifies whether your poll has been successfully closed.

fun interface PollHandler {
    fun onResult(poll: Poll?, e: SendbirdException?)
}