Comments (1)
When a download request has been completed; all FetchListeners attached to an instance of Fetch will be notified.
fetch.addFetchListener(new FetchListener() {
@Override
public void onUpdate(long id, int status, int progress, int error) {
if(id == downloadId && status == Fetch.STATUS_DONE) {
//download is now completed.
}
}
});
Fetch also has other methods you can uses to get the status of a request.
//example 1
RequestInfo requestInfo = fetch.get(downloadId);
if(requestInfo != null && requestInfo.getStatus() == Fetch.STATUS_DONE) {
//download is complete.
}
//example 2
File file = fetch.getDownloadedFile(downloadId);
if(file != null) {
//download is complete.
}
from fetch.
Related Issues (20)
- Today i face error :Failed to resolve: HOT 8
- Download is not working or resume after killing application
- This fetch instance has been closed. Create a new instance using the builder HOT 3
- Please adapt for Android 14 HOT 29
- Feth listener onComplete() called twice HOT 1
- Fetch does not throw exception when internet connection get lost
- Can't toast on a thread that has not called Looper.prepare()
- v3.2.0 build broken HOT 1
- setDownloadConcurrentLimit not work
- V3.2.0 not in maven
- Can not get v3.2.0 nor v3.2.1 HOT 5
- @abbas7777 Can you share a link to the fork/repository as well please?
- Pausing while Waiting in queue fails
- enqueue Fails on Android API 29 with Error: FILE_NOT_FOUND HOT 1
- Failed to resolve library
- ConnectivityManager$TooManyRequestsException HOT 1
- registerReciever method exception android 14 for flag RECEIVER_EXPORTED HOT 1
- Version 3.2.0
- remove broadcast com.tonyodev.fetch2.action.QUEUE_BACKOFF_RESET
- V3.2.0 version can not find
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fetch.