//MLBluetoothSDK/com.masterlock.mlbluetoothsdk.Interfaces/IMLProductDelegate
IMLProductDelegate¶
[androidJvm]\ interface IMLProductDelegate
The delegate of an MLProduct implement the MLProductDelegate interface. The product calls the methods of its delegate to indicate changes to its connection state and Bluetooth events.
Functions¶
| Name | Summary |
|---|---|
| didChangeState | [androidJvm] abstract fun didChangeState(product: MLProduct, newState: MLBroadcastState) Tells the delegate that the product’s state changed SDK will broadcast MLBroadcastState.awake at 1 second intervals while a session with the lock is open MLBroadcastState.asleep when a session has ended MLBroadcastState. |
| didConnect | [androidJvm] abstract fun didConnect(product: MLProduct) Tells the delegate that the product is connected. |
| didDisconnect | [androidJvm] abstract fun didDisconnect(product: MLProduct) Tells the delegate that the product is disconnected. |
| didFailToConnect | [androidJvm] abstract fun didFailToConnect(toProduct: MLProduct, error: Exception) Tells the delegate that the product could not connect |
| didReadAuditEntries | [androidJvm] abstract fun didReadAuditEntries(product: MLProduct, entries: Array<MLAuditTrailEntry>) called by the SDK with MLAuditTrails Entries that have been read from a lock |
| didUploadAuditEntries | [androidJvm] abstract fun didUploadAuditEntries(product: MLProduct, entries: Array<MLAuditTrailEntry>) called by the SDK with MLAuditTrails Entries that have been successfully uploaded |
| firmwareUpdateStatusUpdate | [androidJvm] abstract fun firmwareUpdateStatusUpdate(product: MLProduct, status: MLFirmwareUpdateStatus) Tells status when a firmwareUpdate is in progress |
| onLockStateChange | [androidJvm] abstract fun onLockStateChange(product: MLProduct, lockState: LockState) called by the SDK when LockState has changed |
| shouldUpdateProductData | [androidJvm] abstract fun shouldUpdateProductData(product: MLProduct) The firmware version broadcast by the lock does not match the expected firmware version based on the MLProduct that you have created; Sync your data with ML CPAPI and supply a different MLProduct with updated data. |