NIMMSTADeviceEventHandler

Interface to handle events from a NIMMSTA Device.

For every function the event handler will receive a reference to the NIMMSTADevice that created the event. This reference can then be used to handle the event, for example by turning on the LED or triggering a vibration.

Author

NIMMSTA Team

Functions

Link copied to clipboard
open fun batteryLevelChanged(device: NIMMSTADevice, newBatteryLevel: Int)

Evert is called if the battery level changes.

Link copied to clipboard
open fun didClickButton(device: NIMMSTADevice, button: String)

Event is called if a button was clicked on the screen.

Link copied to clipboard

Called when the connection has been established successfully. The API is now ready to receive any requests and the device is ready to execute any responses.

Link copied to clipboard
open fun didDisconnect(device: NIMMSTADevice, reason: String)

The device was disconnected.

Link copied to clipboard

Event is called if the trigger was double triggered.

Link copied to clipboard
open fun didScanBarcode(device: NIMMSTADevice, barcode: Barcode)

Event is called if a barcode was scanned.

Link copied to clipboard

Event is called if the device starts charging.

Link copied to clipboard
open fun didStopCharging(device: NIMMSTADevice)

Event is called if the device stops charging.

Link copied to clipboard
open fun didTouch(device: NIMMSTADevice, x: Double, y: Double)

Event is called if the screen was touched. Keep in mind that this event is not triggered if a button was touched.

Link copied to clipboard
open fun didTrigger(device: NIMMSTADevice)

Event is called if the trigger was triggered.

Link copied to clipboard

Event is called if the trigger was triple triggered.

Link copied to clipboard
open fun softwareUpdateProgress(device: NIMMSTADevice, progressPercent: Int)

Software update progress handler. Is invoked when a SoftwareUpdate is sent to the device and progress was made.