public interface DfuProgressListener
DfuServiceListenerHelper| Modifier and Type | Method and Description |
|---|---|
void |
onDeviceConnected(String deviceAddress)
Method called when the service has successfully connected, discovered services and found
DFU service on the DFU target.
|
void |
onDeviceConnecting(String deviceAddress)
Method called when the DFU service started connecting with the DFU target.
|
void |
onDeviceDisconnected(String deviceAddress)
Method called when the service disconnected from the device.
|
void |
onDeviceDisconnecting(String deviceAddress)
Method called when the service started to disconnect from the target device.
|
void |
onDfuAborted(String deviceAddress)
Method called when the DFU process has been aborted.
|
void |
onDfuCompleted(String deviceAddress)
Method called when the DFU process succeeded.
|
void |
onDfuProcessStarted(String deviceAddress)
Method called when the DFU process was started and bytes about to be sent.
|
void |
onDfuProcessStarting(String deviceAddress)
Method called when the DFU process is starting.
|
void |
onEnablingDfuMode(String deviceAddress)
Method called when the service discovered that the DFU target is in the application mode
and must be switched to DFU mode.
|
void |
onError(String deviceAddress,
int error,
int errorType,
String message)
Method called when an error occur.
|
void |
onFirmwareValidating(String deviceAddress)
Method called when the new firmware is being validated on the target device.
|
void |
onProgressChanged(String deviceAddress,
int percent,
float speed,
float avgSpeed,
int currentPart,
int partsTotal)
Method called during uploading the firmware.
|
void onDeviceConnecting(String deviceAddress)
deviceAddress - the target device address.void onDeviceConnected(String deviceAddress)
deviceAddress - the target device address.void onDfuProcessStarting(String deviceAddress)
deviceAddress - the target device address.void onDfuProcessStarted(String deviceAddress)
deviceAddress - the target device addressvoid onEnablingDfuMode(String deviceAddress)
onDeviceDisconnected(String) event following
this call.deviceAddress - the target device address.void onProgressChanged(String deviceAddress, int percent, float speed, float avgSpeed, int currentPart, int partsTotal)
deviceAddress - the target device address.percent - the current status of upload (0-99).speed - the current speed in bytes per millisecond.avgSpeed - the average speed in bytes per millisecondcurrentPart - the number pf part being sent. In case the ZIP file contains a Soft Device
and/or a Bootloader together with the application the SD+BL are sent as part 1,
then the service starts again and send the application as part 2.partsTotal - total number of parts.void onFirmwareValidating(String deviceAddress)
deviceAddress - the target device address.void onDeviceDisconnecting(String deviceAddress)
deviceAddress - the target device address.void onDeviceDisconnected(String deviceAddress)
deviceAddress - the target device address.void onDfuCompleted(String deviceAddress)
deviceAddress - the target device address.void onDfuAborted(String deviceAddress)
deviceAddress - the target device address.void onError(String deviceAddress, int error, int errorType, String message)
deviceAddress - the target device address.error - error number.errorType - the error type, one of
DfuBaseService.ERROR_TYPE_COMMUNICATION_STATE,
DfuBaseService.ERROR_TYPE_COMMUNICATION,
DfuBaseService.ERROR_TYPE_DFU_REMOTE,
DfuBaseService.ERROR_TYPE_OTHER.message - the error message.