DfuProgressListener

Listener for status, progress and error events. This listener should be used instead of creating the BroadcastReceiver on your own.

See also

Inheritors

Functions

Link copied to clipboard
abstract fun onDeviceConnected(@NonNull deviceAddress: String)
Method called when the service has successfully connected, discovered services and found DFU service on the DFU target.
Link copied to clipboard
abstract fun onDeviceConnecting(@NonNull deviceAddress: String)
Method called when the DFU service started connecting with the DFU target.
Link copied to clipboard
abstract fun onDeviceDisconnected(@NonNull deviceAddress: String)
Method called when the service disconnected from the device.
Link copied to clipboard
abstract fun onDeviceDisconnecting(deviceAddress: String)
Method called when the service started to disconnect from the target device.
Link copied to clipboard
abstract fun onDfuAborted(@NonNull deviceAddress: String)
Method called when the DFU process has been aborted.
Link copied to clipboard
abstract fun onDfuCompleted(@NonNull deviceAddress: String)
Method called when the DFU process succeeded.
Link copied to clipboard
abstract fun onDfuProcessStarted(@NonNull deviceAddress: String)
Method called when the DFU process was started and bytes about to be sent.
Link copied to clipboard
abstract fun onDfuProcessStarting(@NonNull deviceAddress: String)
Method called when the DFU process is starting.
Link copied to clipboard
abstract fun onEnablingDfuMode(@NonNull deviceAddress: String)
Method called when the service discovered that the DFU target is in the application mode and must be switched to DFU mode.
Link copied to clipboard
abstract fun onError(@NonNull deviceAddress: String, error: Int, errorType: Int, message: String)
Method called when an error occur.
Link copied to clipboard
abstract fun onFirmwareValidating(@NonNull deviceAddress: String)
Method called when the new firmware is being validated on the target device.
Link copied to clipboard
abstract fun onProgressChanged(@NonNull deviceAddress: String, percent: Int, speed: Float, avgSpeed: Float, currentPart: Int, partsTotal: Int)
Method called during uploading the firmware.