Logout
Overview
In this section, you can get instructions to log out a user from Kommunicate chat.
Logout
Call the following code when a user logs out from your app to log out the user from Kommunicate:
Kotlin
If you are using Kotlin:
Kommunicate.logout(context, object : KMLogoutHandler {
override fun onSuccess(context: Context?) {
Log.i("Logout", "Success")
}
override fun onFailure(exception: Exception?) {
Log.i("Logout", "Failed")
}
})
Java
If you are using Java:
Kommunicate.logout(context, new KMLogoutHandler() {
@Override
public void onSuccess(Context context) {
Log.i("Logout","Success");
}
@Override
public void onFailure(Exception exception) {
Log.i("Logout","Failed");
}
});