This article needs a technical review. How you can help.
InstallListeners are notified of an AddonInstall's progress. They may be registered to hear events from all AddonInstalls through AddonManager.addInstallListener() or to a single AddonInstall through AddonInstall.addListener().
Method Overview
void onNewInstall(in |
void onDownloadStarted(in |
void onDownloadProgress(in |
void onDownloadEnded(in |
void onDownloadCancelled(in |
void onDownloadFailed(in |
void onInstallStarted(in |
void onInstallEnded(in |
void onInstallCancelled(in |
void onInstallFailed(in |
void onExternalInstall(in |
Methods
onNewInstall()
Called when a new instance of AddonInstall is created, primarily so UI can display some kind of progress for all installs.
void onNewInstall(
in AddonInstall install
)
Parameters
- install
-
The
AddonInstallrepresenting the install
onDownloadStarted()
Called when downloading begins for an add-on install. Only called for add-ons that need to be downloaded. A listener may return false to cancel the download.
void onDownloadStarted(
in AddonInstall install
)
Parameters
- install
-
The
AddonInstallrepresenting the install
onDownloadProgress()
Called as data is received during a download. Check the AddonInstall.progress() property for the amount of data downloaded and the AddonInstall.maxProgress() property for the total data expected. A listener may return false to cancel the download.
void onDownloadProgress(
in AddonInstall install
)
Parameters
- install
-
The
AddonInstallrepresenting the install
onDownloadEnded()
Called when downloading completes successfully for an add-on install. Only called for add-ons that need to be downloaded.
void onDownloadEnded(
in AddonInstall install
)
Parameters
- install
-
The
AddonInstallrepresenting the install
onDownloadCancelled()
Called when downloading is cancelled. Only called for add-ons that need to be downloaded.
void onDownloadCancelled(
in AddonInstall install
)
Parameters
- install
-
The
AddonInstallrepresenting the install
onDownloadFailed()
Called if there is some error downloading the add-on. Only called for add-ons that need to be downloaded.
void onDownloadFailed(
in AddonInstall install
)
Parameters
- install
-
The
AddonInstallrepresenting the install
onInstallStarted()
Called when installation of an add-on begins. A listener may return false to cancel the install.
void onInstallStarted(
in AddonInstall install
)
Parameters
- install
-
The
AddonInstallrepresenting the install
onInstallEnded()
Called when installation of an add-on is complete. The newly installed add-on may require a restart in order to become active.
void onInstallEnded( inAddonInstallinstall inAddonaddon )
Parameters
- install
-
The
AddonInstallrepresenting the install - addon
-
The
Addonaddon that has been installed
onInstallCancelled()
Called when installation is cancelled.
void onInstallCancelled(
in AddonInstall install
)
Parameters
- install
-
The
AddonInstallrepresenting the install
onInstallFailed()
Called when there is a failure installing the add-on.
void onInstallFailed(
in AddonInstall install
)
Parameters
- install
-
The
AddonInstallrepresenting the install
onExternalInstall()
Called when an add-on is installed through some system other than an AddonInstall.
void onExternalInstall( inAddonaddon, inAddonexistingAddon, in boolean needsRestart )