Skip to main content
Interim hand-authored reference. This page is authored directly from the Seam Android SDK public Kotlin sources. See the reference overview for context.

Overview

UnlockProximity is an enum class representing the proximity at which a credential is used to unlock a reader. Pass one of these values to SeamSDK.getInstance().unlock() to specify the required proximity for an attempt.
enum class UnlockProximity {
    TOUCH,
    NEARBY,
    REMOTE
}
If no unlockProximity argument is provided to unlock(), the SDK uses the first value in SeamCredential.supportedUnlockProximities as the default.

Cases

CaseDescription
TOUCHThe user must hold the back of the phone against the reader to unlock.
NEARBYThe user must be physically close to the reader but does not need to touch it.
REMOTEThe reader is unlocked from a remote location, for example via Wi-Fi. No physical proximity is required.

Example

// Use the credential's default proximity (first in supportedUnlockProximities)
SeamSDK.getInstance().unlock(credentialId = credential.id!!)

// Require tap-to-unlock
SeamSDK.getInstance().unlock(
    credentialId = credential.id!!,
    unlockProximity = UnlockProximity.TOUCH
)

// Require nearby Bluetooth proximity
SeamSDK.getInstance().unlock(
    credentialId = credential.id!!,
    unlockProximity = UnlockProximity.NEARBY
)

// Unlock remotely
SeamSDK.getInstance().unlock(
    credentialId = credential.id!!,
    unlockProximity = UnlockProximity.REMOTE
)
See also: SeamCredential.supportedUnlockProximities, SeamSDK.unlock()