Log out

Learn how to log out customers.

Call logOut to log out a customer from chat. logOut removes all conversations from the device.

logOut won't clear any global settings (for example, chat settings and business hours) data.

Kustomer.getInstance().logOut()

If using push notifications with the SDK

If you want to disable receiving push notifications while logging out the user, make sure to call deregisterDeviceForPushNotifications before calling logOut.

suspend Kustomer.getInstance().deregisterDeviceForPushNotifications{
            when (it) {
                is KusResult.Success -> {
                    //Call logout on success
                    Kustomer.getInstance().logOut()
                }

                is KusResult.Error -> it.exception.localizedMessage
            }
        }