public class DfuProgressListenerAdapter extends java.lang.Object implements DfuProgressListener
| Constructor and Description |
|---|
DfuProgressListenerAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
onDeviceConnected(java.lang.String deviceAddress)
Method called when the service has successfully connected, discovered services and found DFU service on the DFU target.
|
void |
onDeviceConnecting(java.lang.String deviceAddress)
Method called when the DFU service started connecting with the DFU target.
|
void |
onDeviceDisconnected(java.lang.String deviceAddress)
Method called when the service disconnected from the device.
|
void |
onDeviceDisconnecting(java.lang.String deviceAddress)
Method called when the service started to disconnect from the target device.
|
void |
onDfuAborted(java.lang.String deviceAddress)
Method called when the DFU process has been aborted.
|
void |
onDfuCompleted(java.lang.String deviceAddress)
Method called when the DFU process succeeded.
|
void |
onDfuProcessStarted(java.lang.String deviceAddress)
Method called when the DFU process was started and bytes about to be sent.
|
void |
onDfuProcessStarting(java.lang.String deviceAddress)
Method called when the DFU process is starting.
|
void |
onEnablingDfuMode(java.lang.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(java.lang.String deviceAddress,
int error,
int errorType,
java.lang.String message)
Method called when an error occur.
|
void |
onFirmwareValidating(java.lang.String deviceAddress)
Method called when the new firmware is being validated on the target device.
|
void |
onProgressChanged(java.lang.String deviceAddress,
int percent,
float speed,
float avgSpeed,
int currentPart,
int partsTotal)
Method called during uploading the firmware.
|
public void onDeviceConnecting(java.lang.String deviceAddress)
DfuProgressListeneronDeviceConnecting in interface DfuProgressListenerdeviceAddress - the target device addresspublic void onDeviceConnected(java.lang.String deviceAddress)
DfuProgressListeneronDeviceConnected in interface DfuProgressListenerdeviceAddress - the target device addresspublic void onDfuProcessStarting(java.lang.String deviceAddress)
DfuProgressListeneronDfuProcessStarting in interface DfuProgressListenerdeviceAddress - the target device addresspublic void onDfuProcessStarted(java.lang.String deviceAddress)
DfuProgressListeneronDfuProcessStarted in interface DfuProgressListenerdeviceAddress - the target device addresspublic void onEnablingDfuMode(java.lang.String deviceAddress)
DfuProgressListenerDfuProgressListener.onDeviceDisconnected(String) event following this call.onEnablingDfuMode in interface DfuProgressListenerdeviceAddress - the target device addresspublic void onProgressChanged(java.lang.String deviceAddress,
int percent,
float speed,
float avgSpeed,
int currentPart,
int partsTotal)
DfuProgressListeneronProgressChanged in interface DfuProgressListenerdeviceAddress - the target device addresspercent - the current status of upload (0-99)speed - the current speed in bytes per millisecondavgSpeed - 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 2partsTotal - total number of partspublic void onFirmwareValidating(java.lang.String deviceAddress)
DfuProgressListeneronFirmwareValidating in interface DfuProgressListenerdeviceAddress - the target device addresspublic void onDeviceDisconnecting(java.lang.String deviceAddress)
DfuProgressListeneronDeviceDisconnecting in interface DfuProgressListenerdeviceAddress - the target device addresspublic void onDeviceDisconnected(java.lang.String deviceAddress)
DfuProgressListeneronDeviceDisconnected in interface DfuProgressListenerdeviceAddress - the target device addresspublic void onDfuCompleted(java.lang.String deviceAddress)
DfuProgressListeneronDfuCompleted in interface DfuProgressListenerdeviceAddress - the target device addresspublic void onDfuAborted(java.lang.String deviceAddress)
DfuProgressListeneronDfuAborted in interface DfuProgressListenerdeviceAddress - the target device addresspublic void onError(java.lang.String deviceAddress,
int error,
int errorType,
java.lang.String message)
DfuProgressListeneronError in interface DfuProgressListenerdeviceAddress - the target device addresserror - error numbererrorType - 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