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

Update a poll option

Copy link

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

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

    // The poll option is successfully updated.
}

PollHandler

Copy link

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

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