Getting started with quickblox – Prepare Chat service

To initialise chat service use:

QBChatService.setDebugEnabled(true); // enable chat logging

QBChatService.setDefaultPacketReplyTimeout(10000);//set reply
timeout in milliseconds for connection’s packet. Can be used for
events like login, join to dialog to increase waiting response time
from server if network is slow.

To configure chat socket use QBChatService.ConfigurationBuilder;

QBChatService.ConfigurationBuilder chatServiceConfigurationBuilder = new QBChatService.ConfigurationBuilder();
chatServiceConfigurationBuilder.setSocketTimeout(60); //Sets chat socket's read timeout in seconds
chatServiceConfigurationBuilder.setKeepAlive(true); //Sets connection socket's keepAlive option.
chatServiceConfigurationBuilder.setUseTls(true); //Sets the TLS security mode used when making the connection. By default TLS is disabled.

if you want to reproduce, please indicate the source:
Getting started with quickblox – Prepare Chat service - CodeDay