customer-android-kotlin

//core/com.kustomer.core/KustomerCore

KustomerCore

[androidJvm]
class KustomerCore

KustomerCore must be initialized in your Main Application class only. This will ensure that the SDK will always be initialized even if the Client App is killed in Background and restarted by Android.

Create a KustomerCoreOptions object using KustomerCoreOptions.Builder to override any settings with in the sdk

If you don’t want to override any settings and use the default ones, you can skip creating this object

val kustomerCoreOptions = KustomerCoreOptions.Builder()
.setBusinessScheduleId("<business_schedule_id>") //override business schedule
.setLogLevel(KusLogOptions.KusLogOptionAll) //set log options
.build()

Add the following lines of code to your onCreate method in your Application class:

KustomerCore.init(
application,
"API_KEY", // read it from gradle properties
kustomerCoreOptions //Optional parameter
)

Note: If you don’t have an Application class, you must create one to make sure Kustomer Core is always initialized properly.

See also

androidJvm

   
com.kustomer.core.KustomerCoreOptions.Builder  

Types

Name Summary
Companion [androidJvm]
object Companion

Functions

Name Summary
changeActiveAssistant [androidJvm]
suspend fun changeActiveAssistant(activeAssistant: KusActiveAssistant): KusResult<KusAssistant>?
getContext [androidJvm]
fun getContext(): Context
isLoggedIn [androidJvm]
fun isLoggedIn(userEmail: String? = null, userId: String? = null): KusResult<Boolean>
isNetworkAvailable [androidJvm]
fun isNetworkAvailable(): Boolean
kusChatProvider [androidJvm]
fun kusChatProvider(): KusChatProvider
kusKbProvider [androidJvm]
fun kusKbProvider(): KusKbProvider
kusPollingConfigProvider [androidJvm]
fun kusPollingConfigProvider(): KusPollerConfigProvider
kusPushRegistrationProvider [androidJvm]
fun kusPushRegistrationProvider(): KusPushRegistrationProvider
logOut [androidJvm]
fun logOut()
overrideAssistant [androidJvm]
suspend fun overrideAssistant(assistantId: String): KusResult<KusAssistant>
overrideBrand [androidJvm]
suspend fun overrideBrand(brandId: String): KusResult<KusChatSetting>
overrideBusinessSchedule [androidJvm]
suspend fun overrideBusinessSchedule(scheduleId: String): KusResult<KusSchedule>