use of de.robv.android.xposed.installer.util.DownloadsUtil.DownloadFinishedCallback in project XposedInstaller by rovo89.
the class StatusInstallerFragment method download.
private void download(Context context, String title, FrameworkZips.Type type, final RunnableWithParam<File> callback) {
OnlineFrameworkZip zip = FrameworkZips.getOnline(title, type);
new DownloadsUtil.Builder(context).setTitle(zip.title).setUrl(zip.url).setDestinationFromUrl(DownloadsUtil.DOWNLOAD_FRAMEWORK).setCallback(new DownloadFinishedCallback() {
@Override
public void onDownloadFinished(Context context, DownloadInfo info) {
LOCAL_ZIP_LOADER.triggerReload(true);
callback.run(new File(info.localFilename));
}
}).setMimeType(DownloadsUtil.MIME_TYPES.ZIP).setDialog(true).download();
}
Aggregations