Learn how to install QuickBlox SDK and send your first message.
APPLICATION_ID
, AUTH_KEY
, AUTH_SECRET
, and ACCOUNT_KEY
to the init()
method.
init()
method. If you attempt to call a method without connecting, the error is returned.user
, call the signIn()
method, and pass the user
to it using the code snippet below.
login()
method to connect to the chat server.
dialog
using the the setType()
and setOccupantsIds()
methods. Then, call the createChatDialog()
method and pass the dialog
to it.
QBDialogMessageListener
you can monitor whether an incoming message or error is received from QuickBlox server. Use QBIncomingMessagesManager
to listen to all incoming messages and related errors.
QBChatMessage
instance and set a text message using the setBody()
method. Then, call the sendMessage()
method.
saveToHistory
parameter if you want this message to be saved in the chat history.