Interface OTAListener


public interface OTAListener
Listener for OTA-related events.
Since:
1.0
Version:
2024-07-24
  • Method Details

    • onOTAStart

      default void onOTAStart(OTAService otaService, String targetManifestId)
      Called when targetManifestId is set, which will cause the OTA process to start downloading artifacts.
      Parameters:
      otaService - the OTAService
      targetManifestId - the currently set targetManifestId
    • onOTAStop

      default void onOTAStop(OTAService otaService)
      Called when targetManifestId is set to null, which indicates that the OTA service is not currently attempting to download any artifacts.
      Parameters:
      otaService - the OTAService
    • onOTAInstallBegin

      default void onOTAInstallBegin(OTAService otaService)
      Called when OTA download is complete and the release is about to be installed on the device. The release will not be activated, just installed.
      Parameters:
      otaService - the OTAService
    • onOTAArtifactChanges

      default void onOTAArtifactChanges(OTAService otaService, Collection<OTAArtifact> downloadArtifacts)
      Called when information about downloaded artifacts changes. This is called a short delay after changes occur to keep the number of calls down.
      Parameters:
      otaService - the OTAService
      downloadArtifacts - current list of all artifact information
    • onOTAInstallSuccess

      default void onOTAInstallSuccess(OTAService otaService)
      Called when installation completes successfully.
      Parameters:
      otaService - the OTAService
    • onOTAInstallFail

      default void onOTAInstallFail(OTAService otaService, String reason)
      Called when installation fails.
      Parameters:
      otaService - the OTAService
      reason - the reason code for the failure
    • onOTAPendingActivation

      default void onOTAPendingActivation(OTAService otaService, String pendingManifestId)
      Called when a release has been installed and activation is pending.
      Parameters:
      otaService - the OTAService
      pendingManifestId - the manifest that is pending activation
    • onOTAPausedDueToInvalidManifest

      default void onOTAPausedDueToInvalidManifest(OTAService otaService, String manifestId)
      Called when OTA is paused due to recurring errors or issues with the manifest. OTA will attempt to install again on the next reboot, change of targetManifestId or a call to resumeFromInvalidManifest() . Do not simply attempt to resume as this event is already the result of multiple failures so all this will do is cause a download / cpu intensive loop that does nothing. This is intended as feedback to an agent that can communicate back the issue with the current manifest.