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.

Update a poll option

You can update a poll option by specifying the pollId, the pollOptionId, and an updated string for optionText parameters in the updatePollOption() method.

channel.updatePollOption(pollId, pollOptionId, "Updated option1") { poll, e ->
    if (e != null) {
        // Handle error.
    }

    // The poll option is successfully updated.
}

PollHandler

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

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