Interim hand-authored reference. This page is authored directly from the Seam Android SDK public Kotlin sources. See the reference overview for context.
Overview
SeamSDK is the single entry point for all Seam Android SDK operations. It is a class with a private constructor — obtain the instance via SeamSDK.getInstance() after calling SeamSDK.initialize().
- All
StateFlowproperties (credentials,isActivated,unlockStatus) are thread-safe. - All suspend functions can be called from any coroutine context.
initializeis thread-safe and idempotent.
- The SDK caches credentials and can work offline for unlock operations.
activate()requires an internet connection on first activation.refresh()always requires an internet connection.unlock()can work offline if credentials are already cached.
Companion Object Methods
initialize(context, clientSessionToken)
Initializes the Seam Android SDK. Call this once at app launch, typically in Application.onCreate().
| Parameter | Type | Description |
|---|---|---|
context | Context | The Android application context. |
clientSessionToken | String | A valid client session token for the app user. |
| Error | Description |
|---|---|
SeamError.AlreadyInitialized | The SDK is already initialized. Call deactivate() first to reinitialize. |
SeamError.InternetConnectionRequired | No internet connection is available. |
SeamError.InvalidClientSessionToken | The token format is invalid. |
SeamError.DeactivationInProgress | A deactivation is already in progress. |
getInstance()
Returns the singleton instance of SeamSDK. Thread-safe; can be called from any thread.
SeamSDK instance.
Throws
| Error | Description |
|---|---|
SeamError.InitializationRequired | initialize() has not been called yet. |
StateFlow Properties
credentials
The current list of SeamCredential objects for the app user. Emits an updated list whenever credentials change.
errors property to determine if it is ready for use. Latest value is always available via .value.
SeamCredential
isActivated
Whether the SDK is currently activated. Emits true after a successful activate() call and false after deactivate().
.value.
unlockStatus
The current status of the unlock operation. Emits SeamUnlockEvent instances as unlock operations progress.
.value. Subscribe to this flow before calling unlock() to ensure no events are missed.
SeamUnlockEvent
Suspend Methods
activate()
Activates the SDK by syncing with the server and setting up background services. Requires an active internet connection on first activation. Safe to call multiple times — subsequent calls are no-ops if already activated.
After successful activation, isActivated emits true and credentials begin syncing automatically.
| Error | Description |
|---|---|
SeamError.InitializationRequired | initialize() has not been called. |
SeamError.InternetConnectionRequired | No internet connection is available. |
SeamError.InvalidClientSessionToken | The client session token is invalid. |
deactivate(deintegrate)
Deactivates the SDK. Stops background operations and releases resources. Credentials remain cached and available for the next activation. Safe to call multiple times.
| Parameter | Type | Default | Description |
|---|---|---|---|
deintegrate | Boolean | false | If true, removes the device association and clears all state. |
| Error | Description |
|---|---|
SeamError.InitializationRequired | initialize() has not been called. |
SeamError.DeactivationInProgress | A deactivation is already in progress. |
refresh()
Manually syncs credentials with the server and updates the credentials StateFlow. Requires an active internet connection. In most cases, automatic background sync makes manual refresh unnecessary.
SeamCredential objects after the refresh completes.
Throws
| Error | Description |
|---|---|
SeamError.InitializationRequired | initialize() has not been called. |
SeamError.DeactivationInProgress | A deactivation is in progress. |
Non-Suspend Methods
unlock(credentialId, unlockProximity?, timeout?)
Initiates an unlock operation for the specified credential. Progress events are emitted to the unlockStatus StateFlow. The operation continues even if the app moves to the background. Works offline if credentials are already cached.
CredentialId is a type alias for String.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
credentialId | CredentialId | — | The credential ID to unlock. |
unlockProximity | UnlockProximity? | null | The required proximity for this attempt. If null, uses the provider default (the first value in SeamCredential.supportedUnlockProximities). |
timeout | Duration? | null | Maximum time to wait for the unlock operation. If null, uses the provider default. |
Job that can be used to cancel the unlock operation.
Throws
| Error | Description |
|---|---|
SeamError.InitializationRequired | initialize() has not been called. |
SeamError.ActivationRequired | The SDK has not been activated. |
SeamError.IntegrationNotFound | No integration found for the credential’s provider. |
SeamError.InvalidCredentialId | The credential ID is not recognized by the SDK. |
SeamError.CredentialErrors | The credential has one or more unresolved errors. |
SeamError.InvalidUnlockProximity | The specified unlock proximity is not supported by this credential. |
UnlockProximity, SeamUnlockEvent, SeamError
listCredentials()
Returns the current credential list synchronously. If the SDK has not been initialized, returns an empty list.
SeamCredential objects.
setUnlockEventListener(listener)
Registers a callback to receive unlock events as an alternative to collecting the unlockStatus StateFlow.
| Parameter | Type | Description |
|---|---|---|
listener | (SeamUnlockEvent) -> Unit | A lambda invoked for each unlock event. |
setCredentialsListener(listener)
Registers a callback to receive credential list updates as an alternative to collecting the credentials StateFlow.
| Parameter | Type | Description |
|---|---|---|
listener | (List<SeamCredential>) -> Unit | A lambda invoked whenever the credential list changes. |
setNotification(notification)
Sets the foreground service notification used during unlock scanning. Required for Assa Abloy foreground scanning.
| Parameter | Type | Description |
|---|---|---|
notification | Notification | The notification to display while the foreground service is running. |

