SeamSDK

class SeamSDK

This is the main entry point for the Seam Android SDK.

Use the getInstance function to get the instance of this class. You can only get the instance of the class after you have initialized the SDK by calling initialize.

The initialize function will initialize the SDK.

Thread Safety

StateFlow Lifecycle

  • credentials: Emits whenever credential list changes, survives configuration changes

  • unlockStatus: Emits unlock events, latest event is always available via .value

  • isActivated: Reflects current SDK activation state

Collecting these flows is lifecycle-safe when used with Android lifecycle-aware scopes

Offline Behavior

  • SDK caches credentials and can work offline for unlock operations

  • activate requires internet connection initially

  • refresh requires internet connection

  • unlock can work offline if credentials are already cached

Error Recovery

  • Most operations can be safely retried after fixing underlying issues

  • Credential errors (in SeamCredential.errors) should be resolved before unlock

  • Network errors during activate/refresh are transient and can be retried

Background Processing

  • Unlock operations continue in background

  • StateFlow emissions work across app lifecycle

Lifecycle

  • Call initialize once per app session, typically in Application.onCreate()

  • activate when user wants to use credential features

  • No explicit cleanup needed - Android handles resource cleanup

  • deactivate stops background operations but preserves credentials

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns the list of credentials for the current app user.

Link copied to clipboard
val isActivated: StateFlow<Boolean>

Returns whether the app user's phone has been activated.

Link copied to clipboard
val unlockStatus: StateFlow<UnlockEvent>

Returns the current status of the unlock feature.

Functions

Link copied to clipboard
suspend fun activate()

Activates the app user's phone.

Link copied to clipboard
suspend fun deactivate(deintegrate: Boolean = false)

Deactivates the app user's phone.

Link copied to clipboard

Lists the credentials for the current app user.

Link copied to clipboard
suspend fun refresh(): List<SeamCredential>

Refreshes the credentials for the current app user.

Link copied to clipboard

Sets the listener for the credentials.

Link copied to clipboard
fun setNotification(notification: Notification)

Sets the notification for the unlock feature. Required for Assa Abloy foreground scanning.

Link copied to clipboard

Sets the listener for the unlock events.

Link copied to clipboard
suspend fun unlock(credentialId: <Error class: unknown class>, timeout: Duration? = null)

Unlocks the app user's phone.