Connection

interface Connection

This module allows to connect to the Rainbow Cloud Services. Your application will have to use this module to be able to sign-in with the user credentials and to listen to the connection state with the Rainbow Cloud Services.

Types

ConnectionState
Link copied to clipboard
enum ConnectionState : Enum<Connection.ConnectionState>

Functions

registerConnectionChangedListener
Link copied to clipboard
abstract fun registerConnectionChangedListener(listener: IConnectionChanged)
Register a listener on connection state events
resetCacheAndDatabase
Link copied to clipboard
abstract fun resetCacheAndDatabase()
Use this method if you need ot manually reset image cache and database.
signin
Link copied to clipboard
abstract fun signin(login: String, password: String, listener: SigninResponseListener?)
Allow to sign-in to Rainbow environment from a Rainbow official user account that already exists.
abstract fun signin(login: String, password: String, host: String, listener: SigninResponseListener?)
Allow to sign-in to Rainbow environment from a Rainbow official user account that already exists.
signinWithOidcToken
Link copied to clipboard
abstract fun signinWithOidcToken(token: String, listener: SigninResponseListener?)
Allow to sign-in to Rainbow environment from a Rainbow official user account that already exists.
abstract fun signinWithOidcToken(token: String, host: String?, listener: SigninResponseListener?)
Allow to sign-in to Rainbow environment from a Rainbow official user account that already exists.
signinWithToken
Link copied to clipboard
abstract fun signinWithToken(token: String, listener: SigninResponseListener?)
Allow to sign-in to Rainbow environment from a Rainbow official user account that already exists.
abstract fun signinWithToken(token: String, host: String, listener: SigninResponseListener?)
Allow to sign-in to Rainbow environment from a Rainbow official user account that already exists.
signout
Link copied to clipboard
abstract fun signout(listener: SignoutResponseListener?)
Allow to sign-out from Rainbow.
unregisterConnectionChangedListener
Link copied to clipboard
abstract fun unregisterConnectionChangedListener(listener: IConnectionChanged)
Unregister a listener on connection state events

Properties

isConnected
Link copied to clipboard
abstract val isConnected: Boolean
Return true if the current connection state is equals to ConnectionState.RAINBOW_CONNECTIONCONNECTED.
isDisconnected
Link copied to clipboard
abstract val isDisconnected: Boolean
Return true if the current connection state is equals to ConnectionState.RAINBOW_CONNECTIONDISCONNECTED.
isInProgress
Link copied to clipboard
abstract val isInProgress: Boolean
Return true if the current connection state is equals to ConnectionState.RAINBOW_CONNECTIONINPROGRESS.
state
Link copied to clipboard
abstract val state: Connection.ConnectionState
Get the current connection state with the Rainbow Cloud Services.