Donkey Lock Kit
Main entry for interacting with BLE-enabled Donkey vehicles
Functions
Finalizing lock should be done after prepareEndRental to clear all the outstanding cache and disconnecting of the bluetooth lock. Note that once the lock is finalized, it is not possible to do any more of lock actions.
Initializing of lock has to be done before any unlock, lock, prepareEndRental or finalizeLock This function needs to be called only once per rental. In case, initializeLock is called again later after some unlocking and locking, the lock might not be able to open due to the eKey getting reset.
In order to interact with Donkey bike locks, SDK must be initialized with the sdkToken provided by Donkey Republic.
For locking a Donkey bike, use this function
For preparing Donkey bike for end rental, use this function. prepareEndRental invokes checking of the lock state including the bike.donkey.lockkit.updates.ConnectionUpdate.ExtraLockCheck - necessary operation before ending rental to make sure the vehicle is safe from any misuse. In the case of lock being unlocked, this function will try to lock it as well. Note however that this does not end the rental. Remember to call the required endpoint on TOMP.
For unlocking a Donkey bike, use this function
Properties
To change bike.donkey.lockkit.DonkeyConfig.ServerEnvironment or bike.donkey.lockkit.DonkeyConfig.LogLevel Updating of the config values can be done only before calling initializeSdk