Skip to content

Instantly share code, notes, and snippets.

@nparsons08 nparsons08/MainActivity.kt Secret
Created Mar 2, 2020

What would you like to do?
// mobile/android/app/src/main/kotlin/io/getstream/flutter_the_stream/MainActivity.kt:276
private fun postChannelMessage(result: MethodChannel.Result, channelId: String, message: String) {
val client = StreamChat.getInstance(this.application)
val channel =, channelId)
val streamMessage = Message()
streamMessage.text = message
channel.sendMessage(streamMessage, object : MessageCallback {
override fun onSuccess(response: MessageResponse?) {
override fun onError(errMsg: String?, errCode: Int) {
// handle errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.