Interface OTACallbacks


public interface OTACallbacks

Method Summary

Modifier and Type Method and Description
void onTransitionUpdateComplete(java.lang.String deviceName)
NOTE: Transition updates should be avoided for apps supporting devices with firmware >v2.0!
Called when an intermediate image was uploaded first.
void onTransitionUpdateRequired(java.lang.String deviceName)
NOTE: Transition updates should be avoided for apps supporting devices with firmware >v2.0!
Called when an update requires an intermediate image.
void onUpdateAbort(java.lang.String deviceName)
Called after an updateAbort() request AND update successfully aborted
void onUpdateCheckComplete(java.lang.String deviceName, boolean isUpToDate, FirmwareVersion version)
Called after a checkForUpdates() request
void onUpdateComplete(java.lang.String deviceName)
Called after an update has been completed (data sent and successfully verified by device).
void onUpdateDataSent(java.lang.String deviceName, int bytesSent, int bytesRemaining)
Called after a BLE packet is sent to the device as part of an update
void onUpdateError(java.lang.String deviceName, OTAStatus status)
Called when an error occurred during an update.
void onUpdateInitSuccess(java.lang.String deviceName)
Called when OTA manager and device have been successfully initialised
void onUpdateStart(java.lang.String deviceName)
Called after an updateStart() request AND update successfully started (data now uploading)
void onUpdateVersionRead(java.lang.String deviceName, java.lang.String version)
Called after a readFirmwareVersion() request

Method Detail

  • onUpdateInitSuccess

    void onUpdateInitSuccess(java.lang.String deviceName)
    Called when OTA manager and device have been successfully initialised
    Parameters:
    deviceName - Name of device
  • onUpdateVersionRead

    void onUpdateVersionRead(java.lang.String deviceName,
                           java.lang.String version)
    Called after a readFirmwareVersion() request
    Parameters:
    deviceName - Name of device
    version - Device current version String
    See Also:
    OTAManager
  • onUpdateCheckComplete

    void onUpdateCheckComplete(java.lang.String deviceName,
                             boolean isUpToDate,
                             FirmwareVersion version)
    Called after a checkForUpdates() request
    Parameters:
    deviceName - Name of device
    isUpToDate - true if device firmware version == update file version
    version - Update file version
  • onUpdateAbort

    void onUpdateAbort(java.lang.String deviceName)
    Called after an updateAbort() request AND update successfully aborted
    Parameters:
    deviceName - Name of device
  • onUpdateStart

    void onUpdateStart(java.lang.String deviceName)
    Called after an updateStart() request AND update successfully started (data now uploading)
    Parameters:
    deviceName - Name of device
  • onUpdateDataSent

    void onUpdateDataSent(java.lang.String deviceName,
                        int bytesSent,
                        int bytesRemaining)
    Called after a BLE packet is sent to the device as part of an update
    Parameters:
    deviceName - Name of device
    bytesSent - Total number of bytes sent to device
    bytesRemaining - Total number of bytes remaining in update image
  • onUpdateComplete

    void onUpdateComplete(java.lang.String deviceName)
    Called after an update has been completed (data sent and successfully verified by device). Device will now reboot, so app should disconnect and reconnect if necessary.
    Parameters:
    deviceName - Name of device
  • onTransitionUpdateRequired

    void onTransitionUpdateRequired(java.lang.String deviceName)
    NOTE: Transition updates should be avoided for apps supporting devices with firmware >v2.0!
    Called when an update requires an intermediate image. Call transitionUpdateStart() to upload that image first
    Parameters:
    deviceName - Name of device
  • onTransitionUpdateComplete

    void onTransitionUpdateComplete(java.lang.String deviceName)
    NOTE: Transition updates should be avoided for apps supporting devices with firmware >v2.0!
    Called when an intermediate image was uploaded first. The desired image will now be uploaded to device
    Parameters:
    deviceName - Name of device
  • onUpdateError

    void onUpdateError(java.lang.String deviceName,
                     OTAStatus status)
    Called when an error occurred during an update. See OTAStatus for errors that can occur.
    Parameters:
    deviceName - Name of device
    status - Error that occurred
    See Also:
    OTAStatus