Some times Resume/Retry are confusing, if wrongly called, downloads won't work.
The library looks simple & neat, so the calls should be.
For example,
Just one call to initiate a download : Start() - It resumes/retries if already exists, or start a new download.
One call to stop a download: Stop()
Same with REMOVED/DELETED.
You do all internal wirings! So we don't have to check if it is cancelled or paused, blah blahs!
We can check the status of a download, also we can find if a download exist, so no problem with that. You can take a look at this library : https://github.com/lingochamp/okdownload
@jpvs0101 A start method can work with Resume/Retry and renaming the enqueue method to start can work.
The issue I see is with the stop method. A stop method that pauses makes sense. But a stop method for delete or remove does not.
Open to suggestions and debate.
I just give you a overview & pointed a library for reference,
The thing is, simplified calls makes life easier, code will be more
readable & error free.
I agree with remove/ delete, but you should have named like remove(),
removeWithFile(). Now read it. More clear right? Even you can simplified
further like two overloaded functions.
remove() - Just remove entry
remove(boolean) - Pass true to delete file also.
Now it is one call.So we can remember easily, now life is easy ;)
Don't make different calls for slight variations.
start(URL, pathUri) - New download
start(int id) - Resume/ retry
stop(int id) - Pause (for resumable downloads) / stop
remove (id) - just remove entry
remove(id, true) - with file
So basically you just need to remember only 3 names, no mess! Plan the same
for any other stuff!
Now life is simplified!馃槑
Looking into this for version 2.4.0 as it is an enhancement feature not bug fixes. Closing this ticket.
After careful review. This enhancement will not be added to 2.4.0.
Reason: No large support or indication from users of the library that enqueue, resume, pause, delete and remove methods are unclear for their uses.
May be in future... lol... :)