BandyerSDK

class BandyerSDK : BandyerSDKInstance, PotentialFailingComponent

It's the main item required to connect to the Bandyer platform.

Types

Link copied to clipboard
object Companion

BandyerSDKClient Singleton definition

Functions

Link copied to clipboard
open override fun addModuleObserver(bandyerModuleObserver: BandyerModuleObserver)

Add module observer to listen for modules changes.

Link copied to clipboard
open override fun clearUserCache()

Call this method to clear all the cached data. The BandyerSDK will be disposed as well.

Link copied to clipboard
open override fun configure(bandyerSDKConfiguration: BandyerSDKConfiguration)

Configure BandyerSDK. This is the first api that should be called before connecting the BandyerSDK.

Link copied to clipboard
open fun connect(session: Session)
open override fun connect(session: Session, onConnectionErrorListener: OnConnectionErrorListener?)

Initialize BandyerSDK.

Link copied to clipboard
fun connectWithAccessLink(accessLink: String)
Link copied to clipboard
open override fun disconnect()
open override fun disconnect(clearUserCache: Boolean)

Disconnects BandyerSDK session. All modules will be destroyed as well as the user identification. The current configuration is kept so a new call to the connect(session) can be performed.

Link copied to clipboard
open override fun getFailureRecoveryStrategy(throwable: Throwable): FailureRecoverStrategy
Link copied to clipboard
open override fun handleNotification(payload: String)

Handle notification payload. Be aware to call BandyerSDK.connect(session) before.

Link copied to clipboard
open override fun hasFailedWithThrowable(throwable: Throwable): Boolean

Check if the throwable belongs to the component.

Link copied to clipboard
open override fun onPreRecovery(recoverStrategy: FailureRecoverStrategy, throwable: Throwable)

Perform needed operation after an exception has been produced from the component.

Link copied to clipboard
open override fun removeModuleObserver(bandyerModuleObserver: BandyerModuleObserver)

Remove module observer from BandyerSDKClient.

Link copied to clipboard
open override fun removeObservers()

Remove all previously added observers

Link copied to clipboard
open override fun reset()

Dispose BandyerSDK configuration. The BandyerSDK will be disposed as well.

Link copied to clipboard
open override fun setUserDetailsFormatter(userDetailsFormatter: UserDetailsFormatter?)

Sets the user details formatter that will be used to format users details provided from UserDetailsProvider

Link copied to clipboard
open override fun setUserDetailsProvider(userDetailsProvider: UserDetailsProvider?)

Sets the user details provider that will be used to fetch users representation from your integration

Link copied to clipboard
open override fun startListening()

Starts listening for events such as incoming calls and incoming chat messages.

Link copied to clipboard
open override fun stopListening()

Stops listening for events such as incoming calls and incoming chat messages.

Link copied to clipboard
fun updateSession(session: Session?)

Properties

Link copied to clipboard
open override var callModule: CallModule? = null

Returns call module if it has been initialized.

Link copied to clipboard
open override var chatModule: ChatModule? = null

Returns chat module if it has been initialized.

Link copied to clipboard
open override val modules: MutableList<BandyerModule>

Returns all the initialized modules.

Link copied to clipboard
open override val session: Session? = null

Current Session

Link copied to clipboard
open override val userDetailsFormatter: UserDetailsFormatter?

UserDetailsFormatter used to format the user details provided by the userDetailsProvider.

Link copied to clipboard
open override val userDetailsProvider: UserDetailsProvider?

UserDetailsProvider used to fetch users representation from your integration.