download Update
Deprecated
No longer supported
Replace with
sync
Content copied to clipboard
Synchronous function to download an update for an app.
Example usage (kotlin):
val checkScope = CoroutineScope(Dispatchers.IO)
checkScope.launch {
val response = LiveUpdateManager.downloadUpdate(context, "appId", "snapshotId")
// Do something with result
println(response.body.toString())
}
Content copied to clipboard
Example usage (Java):
Executor executor = Executors.newSingleThreadExecutor();
executor.execute(() -> {
DownloadResponse response = LiveUpdateManager.downloadUpdate(getContext(), "appId", "snapshotId");
// Do something with result
});
Content copied to clipboard
Return
the DownloadResponse result
Parameters
context
an Android Context used during the download process
app Id
the ID of the registered app
snapshot Id
the ID of the snapshot to download
Deprecated
No longer supported
Replace with
sync
Content copied to clipboard
Asynchronous function to download an update for an app.
Example usage (kotlin):
LiveUpdateManager.downloadUpdate(applicationContext, "appId", "snapshotId", object : DownloadCallback {
override fun onComplete(result: DownloadResponse?) {
// Do something with result
}
})
Content copied to clipboard
Example usage (Java):
LiveUpdateManager.downloadUpdate(getContext(), "appId", "snapshotId", downloadResponse -> {
// Do something with response
});
Content copied to clipboard
Parameters
context
an Android Context used during the download process
app Id
the ID of the registered app
snapshot Id
the ID of the snapshot to download
callback
a DownloadCallback to handle the response from the download request