Interface OTAListener
public interface OTAListener
Listener for OTA-related events.
- Since:
- 1.0
- Version:
- 2024-07-24
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonOTAArtifactChanges(OTAService otaService, Collection<OTAArtifact> downloadArtifacts) Called when information about downloaded artifacts changes.default voidonOTAInstallBegin(OTAService otaService) Called when OTA download is complete and the release is about to be installed on the device.default voidonOTAInstallFail(OTAService otaService, String reason) Called when installation fails.default voidonOTAInstallSuccess(OTAService otaService) Called when installation completes successfully.default voidonOTAPausedDueToInvalidManifest(OTAService otaService, String manifestId) Called when OTA is paused due to recurring errors or issues with the manifest.default voidonOTAPendingActivation(OTAService otaService, String pendingManifestId) Called when a release has been installed and activation is pending.default voidonOTAStart(OTAService otaService, String targetManifestId) Called whentargetManifestIdis set, which will cause the OTA process to start downloading artifacts.default voidonOTAStop(OTAService otaService) Called whentargetManifestIdis set to null, which indicates that the OTA service is not currently attempting to download any artifacts.
-
Method Details
-
onOTAStart
Called whentargetManifestIdis set, which will cause the OTA process to start downloading artifacts.- Parameters:
otaService- the OTAServicetargetManifestId- the currently set targetManifestId
-
onOTAStop
Called whentargetManifestIdis set to null, which indicates that the OTA service is not currently attempting to download any artifacts.- Parameters:
otaService- the OTAService
-
onOTAInstallBegin
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
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 OTAServicedownloadArtifacts- current list of all artifact information
-
onOTAInstallSuccess
Called when installation completes successfully.- Parameters:
otaService- the OTAService
-
onOTAInstallFail
Called when installation fails.- Parameters:
otaService- the OTAServicereason- the reason code for the failure
-
onOTAPendingActivation
Called when a release has been installed and activation is pending.- Parameters:
otaService- the OTAServicependingManifestId- the manifest that is pending activation
-
onOTAPausedDueToInvalidManifest
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 oftargetManifestIdor a call toresumeFromInvalidManifest(). 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.
-