ComponentUpdateHandler
Base class for handling updates for one or more updatable components, configured by config.
One or more handlers can be provided to a HandlerBasedUpdaterService instance.
See SingleComponentUpdateHandler to implement a ComponentUpdateHandler that only handles a single updatable component. For updating APKs, use SimpleApkUpdateHandler if it fulfills the requirements. Otherwise, consider to use ApkComponentUpdateHandler as a base class.
Handler implementations can optionally use scheduleDetectUpdate to periodically call detectUpdate.
Inheritors
Types
The config of an ComponentUpdateHandler.
Properties
Unique identifier of this handler. This ID must be stable across restarts.
Indicates if the component update handler is ready. While the component update handler is not ready, the checkForUpdates, startDownload, startInstallation, detectUpdate and onReceiveBroadcast are not invoked or delayed.
Collection of UpdateComponentInfo. A new value is emitted each time any value of any entry changes.
Functions
Allows the user to check for new updates.
Invoked by DetectUpdateTriggerWorker and by the default implementation of checkForUpdates to allow the handler to detect if a new update is available.
Initializes the handler with the given handlerContext and calls initInner.
Invoked when UpdaterServiceBroadcastReceiver receives an intent.
Removes a finished update identified by updateId.
Starts the download of an update identified by updateId.
Starts the installation of an update identified by updateId.
Inherited functions
Schedules the invocation of ComponentUpdateHandler.detectUpdate periodically based on the detectUpdateTriggerWorkConfig with the handlerContext of this ComponentUpdateHandler.