Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

05. Send Messages

Himanshu Singh edited this page Oct 31, 2020 · 2 revisions

Case 01:

Send a text message to a user in the channel using,

ChatClient.getInstance().sendMessage(message, "participant_user_token_of_the_Channel", {
   //Message sent successfully
}, {exception->
  //Handle the exception here
})

Case 02:

Send a image from Camera/Gallery or even gifs from giphy like,

ChatClient.getInstance().sendMessage("file_uri", "participant_user_token_of_the_Channel", {
 //Message sent successfully
}, {progress->
 //Handle the progress of file being upload
}, {exception->
  //Handle the exception here
})

Tip : Before uploading the File, make sure you compress it.