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.

Copy a message

A user can copy and send their own message in the same channel or to another channel.

User message

channel.copyUserMessage(TARGET_CHANNEL, MESSAGE_TO_COPY) { message, e ->
    if (e != null) {
        // Handle error.
    }

    // The message is successfully copied to the target channel.
}

File message

channel.copyFileMessage(TARGET_CHANNEL, MESSAGE_TO_COPY) { message, e ->
    if (e != null) {
        // Handle error.
    }

    // The message is successfully copied to the target channel.
}

List of parameters

Parameter nameTypeDescription

userMessage

BaseMessage

Specifies a user message to copy.

fileMessage

BaseMessage

Specifies a file message to copy.

targetChannel

BaseChannel

Specifies a target channel to send a copied message to.

handler

Interface

Specifies the callback handler to receive the response from the Sendbird server for a message copy request.