deactivate
Deactivates the app user's phone.
Stops background operations and cleans up resources. Credentials remain cached and available for the next activation. After deactivation, isActivated will emit false
.
This method is safe to call multiple times and will not throw if already deactivated.
val seamSDK = SeamSDK.getInstance()
try {
// deactivate is a suspend function
seamSDK.deactivate(deintegrate = true)
} catch (seamError: SeamError) {
when (seamError) {
is SeamError.InitializationRequired -> {
// handle error when SDK is not initialized
}
is SeamError.DeactivationInProgress -> {
// handle error when internet connection is required
}
else -> {
// handle other errors
}
}
}
Content copied to clipboard
Parameters
deintegrate
If true, removes device association and clears all state.
Throws
if the SDK has not been initialized yet.
if a deactivation is already in progress.