-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
On the latest version, setCallback method return void and I don't use any sample code on Java Android
void setCallback(FutureCallback callback);
eg.) on ProgressBarDownload.java
Incompatible types error found return void, required com.koushikdutta.async.future.Future<File>
Please help this.
downloading = Ion.with(ProgressBarDownload.this)
.load("http://developer.clockworkmod.com/downloads/51/4883/cm-10.1-20130512-CPUFREQ-m7.zip")
.progressBar(progressBar)
.progressHandler(new ProgressCallback() {
@OverRide
public void onProgress(long downloaded, long total) {
downloadCount.setText("" + downloaded + " / " + total);
}
})
.write(getFileStreamPath("zip-" + System.currentTimeMillis() + ".zip"))
.setCallback(new FutureCallback() {
@OverRide
public void onCompleted(Exception e, File result) {
resetDownload();
if (e != null) {
Toast.makeText(ProgressBarDownload.this, "Error downloading file", Toast.LENGTH_LONG).show();
return;
}
Toast.makeText(ProgressBarDownload.this, "File upload complete", Toast.LENGTH_LONG).show();
}
});