Live Android v1
Live Android
Live
Android
Home
/
Live
/
Android

Authentication

In order to use Sendbird Live SDK in a client app, initialize the SDK with your Sendbird application ID when you first launch the client app. You can find your application ID on Sendbird Dashboard.

class BaseApplication : Application() {
   override fun onCreate() {
       super.onCreate()
       SendbirdLive.init(applicationContext, "APP_ID")
   }
}

Once you’ve authenticated the client app, authenticate a user by calling the SendbirdLive.authenticate() method. Calling this method also authenticates the user with Sendbird Chat SDK which provides the chat functionality during a live event.

private fun signIn() {
   val params = AuthenticateParams(USER_ID, ACCESS_TOKEN)
   SendbirdLive.authenticate(params) { user, e ->
       if (e != null) {
           return@authenticate
       }
       // A user is successfully created.
   }
}