unlock
open override fun unlock(deviceName: String, onUpdate: (ConnectionUpdate) -> Unit, onResult: (Result<UnlockingSuccess>) -> Unit)
Content copied to clipboard
For unlocking 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 UnlockingSuccess 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
LockError. Offline During Pickup
(bike.donkey.lockkit.errors.LockError.OfflineDuringPickup) if the user is not online for the first unlock