Android
Implement the Callbacks
To implement the Auto Update SDK, include the following callback methods:
Method | Description |
---|---|
onInitializationSuccess | Triggered when SDK initialization is successful. |
onUpdateStatus | Triggered when a new version of the app is available, and immediately after invoking thecheckForUpdate() method. |
onDownloadStarted | Triggered when permission to install has been granted by the player, and the download process begins. The SDK will attempt to download the new app version. |
onProgress | Triggered when the download is initiated and when every new byte or packet is downloaded thereafter. You may use it to show download progression in real-time. |
onDownloadEnded | Triggered when the download process is complete. |
onInstallationReady | Triggered when the SDK is ready to start the installation process. |
onError | Triggered when an error occurs during the update process, excluding initialization failures. Follow the instructions in the Android Auto Update SDK troubleshooting article and try to re-initialize again based on the error. |
Example code
Below is the example code for the implementation: