Learn how to add and configure QuickBlox SDK for your app.
init()
method. If you attempt to call a method without initializing SDK previously - the error will be returned.appSettings
object and pass it to the init()
method.
init()
method accepts one argument of the object type that has the following fields:
Field | Required | Description |
---|---|---|
appId | yes | Application ID. |
authKey | yes | Authorization key. |
authSecret | yes | Authorization secret. |
accountKey | yes | Required to get actual apiEndpoint and chatEndpoint for the right server. |
startSessionWithToken()
method. You can find out more about this in the Set existing session section.
apiEndpoint
and chatEndpoint
fields of the appSettings
object and pass it to the init()
method.
init()
method accepts one argument of the object type that has the following fields:
Field | Required | Description |
---|---|---|
appId | yes | Application ID. |
authKey | yes | Authorization key. |
authSecret | yes | Authorization secret. |
accountKey | yes | Required to get actual apiEndpoint and chatEndpoint for the right server. |
apiEndpoint | no | API endpoint. |
chatEndpoint | no | Chat endpoint. |
enableAutoReconnect()
method and pass enable
as true
.
enable
parameter as false
to enableAutoReconnect()
method.
login()
method so it could be applied in a current chat.initStreamManagement()
method and pass autoReconnect
and messageTimeout
parameters to it to enable stream management.
initStreamManagement()
method accepts one argument of the object type that has the following fields:
Field | Required | Description |
---|---|---|
autoReconnect | yes | Set it as true to use Stream resumption for new connections. Default: false. |
messageTimeout | yes | Preferred resumption time (in seconds). If this parameter is greater than 0, than it is applied, otherwise it is not applied. |
login()
because the Stream Management is initialized while Chat login is performed.The Stream Management defines an extension for active management of a stream between a client and server, including features for stanza acknowledgments.