Skip to content

Initialization


The Zabaan class is the gateway to all assistant functionality, customization, and initialization.

Assistant initialization is an asynchronous process. We recommend doing this in your apps Application class.

You can retrieve the access token from the Zabaan CMS.

@Override
public void onCreate(){
    super.onCreate();
    try{
        InitializeParams params = new InitializeParams.Builder()
            .context(this)
            .assistantImage(R.drawable.img_asst_new)
            .accessToken("ACCESS_TOKEN_FROM_CMS")
            .build();
        Zabaan.init(params);
    }catch(Exception e){
        //Handle the exception here.
    }
}
override fun onCreate() {
    super.onCreate()
    try {
        val params = InitializeParams.Builder().apply {
            context(this@Activity)
            assistantImage(R.drawable.img_asst_new)
            accessToken("ACCESS_TOKEN_FROM_CMS")
        }.build()
        Zabaan.init(params)
    } catch(e: Exception) {
        //Handle the exception here.
    }
}
Back to top