Hello everyone, Fetch is a powerful file downloader extension that can download files to ASDs and as well as Download folder in all devices. It is based on Fetch library on github. This extension helps you to download big files with a lot of features. It has some main features :-
- Ability to pause and resume downloads.
- Network-specific downloading support.
- Ability to retry failed downloads.
- Easy progress and status tracking.
- Download remaining time reporting (ETA).
- Download speed reporting.
- Save and Retrieve download information anytime.
Let see its blocks
This event raises when any error occurred.
These are download listener event that raises while listening to the download. They returns the id of the download
This event raises when the progress of a download is changed. It returns the id, download speed, ETA and progress of the download.
This block initialize the Fetch instance with download concurrent limit. This block must be used first before any block.
Download the file of given URL to the given path with id.
These blocks pause/resume/cancel the download for given id. Download will be restarted when the download is cancelled.
Get File Size
Returns the total file size of the file that will be downloaded. It returns the file size in bytes. It may not work in your project it have some issues.
Get Downloaded Size
Returns the downloaded size of the file that is downloaded. It returns the size in bytes. It may not work in your project it have some issues.
Returns the ASD path of your app.
This block converts the bytes into KB and MB automatically, You can use own calculation for converting bytes into big units.
Specifies the network type on which download will be run. (This block is not tested so I am not confirm this work.
How to Use
First of all, You will have to initialize the download instance of fetch on screen initialization.
After initialization, you can download files this way,
Extension is open source now from v1.1.0
Thanks @Shreyash for the super power full Rush .
Thanks @ammar5287 for testing. (Extension is tested in Android 7,8,11 and 12 with ASD).
Thanks @Jerin_Jacob for his awesome GetAix.
Like the extension if you like it
Suggestion and issue are welcome
Thanks for the wonderful extension @Sumit1334
Brilliant - with all these options and especially os ver support Thank you!
Will it handle Google Drive Files, that do not have a filename?
Why not you Marge “convert Bytes” block code in “download size” or “file size” both blocks it reduces block everytime both blocks use together.
use math block. and divide to 1024
What an Extention… Wonderful
It could not download drive files properly until we provide big direct download link. For ex
I could have, but many users shows download info in different ways so I think bytes should be better than any other units.
Thanks for your good posts.
Great extension, thanks!
Note: If downloading to one of the two
/Documents on devices with API < 30 you must of course request
This should now make my extension DownloadToASD obsolete.
Hey, great job done here!
Got a few notes:
when downloaded (finished) file is removed, I can’t redownload same file again even if I change the ID - it creates just 0 byte file and fires “completed”. Need to reinstall Companion to reenable. Btw. how ID does exactly works here?
is it possible to give an option to download directly to scope=>private folder?
You should explain in more detail what you did:
- Where did you download to?
- With which Android version?
- What kind of file is it (media / non-media)?
- Was the file removed manually or via the app?
Which private folder do you mean (ASD or privateDir, internal storage)?
point 2) solved but
-still have an issue when downloaded file removed manualy AFTER downloadCompleted event
-tested on Android 7 and 10
- And? The AIX is supposed to work with both of them or not?
2.Ok, forgot about scope=>private. The behaviour is same with other folders too.
- both, as you can understand from original post: “to reenable download, Companion reinstall needed”.
- This is not a problem of the blocks IMHO, but the problem of the AIX itself. And in the situation, when Mr. Kumar started his thread here, I hope he will notice my post earlier then somewhere else. Actually I dont know if he is checking AI2 forums on regular basis. Forgive me if broke some formal rule, but I just want to solve the problem which start to be crucial because my clock is ticking…
PS: is there some PM option to contact Mr. Kumar directly?
Dear Anke, what exactly yo don’t understand? I described clearly there is a bug in the aix preventing same file being downloaded again after its been removed after donwload is complete. And I call for help to Mr. Kumar. Period. Whats unclear?