Unregister app user
Unregistering an app user should be done when your app user decides to log out and use your app as a guest or when you no longer want the subsequent tickets to be associated with the current app user.
Unregistering is done by calling the Shake.unregisterUser
method:
- Java
- Kotlin
SettingsActivity.java
private void logOut() {networkService.performLogOut(email, new LogOutListener() {@Overridevoid onLogOutSucceeded() {Shake.unregisterUser();handleLogOut();}@Overridevoid onLogOutFailed(String message) {// Handle failed log out}});}
SettingsActivity.kt
private fun logOut() {networkService.performLogOut(email, object: LogOutListener() {@overridefun onLogOutSucceeded() {Shake.unregisterUser()handleLogOut()}@overridefun onLogOutFailed(message: String) {// Handle failed log out}})}