Connect to Ignite
lateinit var igniteService: IIgniteService
// ...
// After SDK is initialised the IgniteService instance is returned.
// It can also be retrieved later using IgniteServiceSdk.instance()
// NOTE: `clientSecret` can be empty for initial integration
igniteService = IgniteServiceSdk.init(context, clientSecret)IgniteServiceSdk.instance().connect(object: IConnectionCallback {
override fun onConnected() {
// Connection with Ignite is established
Toast.makeText(applicationContext, "Connected.", Toast.LENGTH_SHORT).show()
}
override fun onAuthenticated() {
// Client is now able to call API methods
Toast.makeText(applicationContext, "Authenticated.", Toast.LENGTH_SHORT).show()
}
override fun onDisconnected(message: String?) {
Toast.makeText(applicationContext, "Disconnected from Ignite Service: $message", Toast.LENGTH_SHORT).show()
}
})
// or
igniteService.connect(this)Example
Troubleshooting Connections
ERROR MESSAGE
DESCRIPTION
Last updated
