lock
open override fun lock(deviceName: String, onUpdate: (ConnectionUpdate) -> Unit, onResult: (Result<LockingSuccess>) -> Unit)
Content copied to clipboard
For locking a Donkey bike, use this function
Parameters
device Name
String value of the given lock device name for bluetooth communication
on Update
callback provides different ConnectionUpdates for the app to display progress
on Result
callback provides the LockingSuccess if it was successful, or Throwable in the case of any errors
Throws
Uninitialized Sdk Error
(bike.donkey.lockkit.errors.UninitializedSdkError) if the SDK has not been successfully initialized