Skip to content

//MLBluetoothSDK/com.masterlock.mlbluetoothsdk.Interfaces/IMLLockScannerDelegate

IMLLockScannerDelegate

[androidJvm]\ interface IMLLockScannerDelegate

The SDK’s LockScanner requires a LockScannerDelegate object that implements the MLLockScannerDelegate interface. The lock scanner calls the methods of its delegate during the lifecycle of a Master Lock Bluetooth device’s connection to the phone.

Functions

Name Summary
bluetoothDown [androidJvm]
abstract fun bluetoothDown()
This method is called when the Bluetooth Adapter is changed to a disabled state
bluetoothFailedWithDisconnectCode [androidJvm]
abstract fun bluetoothFailedWithDisconnectCode(deviceId: String, disconnectCode: Int)
Indicates the current bluetooth operation failed with the indicated disconnect code
bluetoothReady [androidJvm]
abstract fun bluetoothReady()
This method is called when the Bluetooth Adapter is ready to use
didDiscoverDevice [androidJvm]
abstract fun didDiscoverDevice(deviceId: String)
Tells the delegate that a Master Lock Bluetooth device was discovered.
onScanFailed [androidJvm]
abstract fun onScanFailed(errorCode: Int)
Indicates that the bluetooth scanner received an error when attempting to scan
productForDevice [androidJvm]
@Nullable
abstract fun productForDevice(deviceId: String): MLProduct
Asks the delegate for an MLProduct whose device identifier matches the one provided.
shouldConnect [androidJvm]
abstract fun shouldConnect(deviceId: String, rssi: Int): Boolean
Asks the delegate if the device should be connected to.