ILockConnectionListener

Interface definition for a listener to be notified of secure lock connection events. Implementations of this interface can be used to receive callbacks when the secure connection status changes or there is a change in the lock's state.

Functions

Link copied to clipboard
abstract fun onError(throwable: Throwable)

Called when an error occurs during the lock communication. E.g. when the lock requires a factory reset DeviceNeedsResetError will be thrown.

Link copied to clipboard
abstract fun onLockConnectionChanged(isConnecting: Boolean, isConnected: Boolean)

Called when the secure connection status to the lock changes.

Link copied to clipboard
abstract fun onLockStatusChanged(currentState: Byte, status: Byte)

Called when there is a change in the lock's state. It's linked to the notification NOTIFICATION_LOCK_STATUS_CHANGE (0xBA), indicating a state update.

Link copied to clipboard
abstract fun onNotification(message: ByteArray)

Called when a notification is received from the lock.