New advance download extension

Hey Android Builder Community, Today I am going to present you a Download Extension with very advanced features.

Features:

  1. You can download any file from it.
  2. It uses TinyDB to store the file details and you can resume the download anytime you want, Even after closing the application. You can easily resume download by its download id.
  3. It always resumes download, also in any error like download failed, network error, link expired, etc. ( In case of link expiration you have to use a different link of the same filename )
  4. NOTE that if 2 files have the same name then the file may get corrupted.
  5. You can also set the Net pack usage limit by this extension, In bytes, and when the download limit exceeds if Pause On Net Usage is enabled then it will automatically pause all downloading
  6. You can also download multiple files by using this extension.
  7. Global download will help you to get all files downloading process and downloaded process by which you can create a single progress bar for all downloading files.
  8. It also has some other features like time conversion bytes conversion to a human-readable format, and ms to human-readable time, You can also get URL headers in this extension.

Here is the block description and usage

  • This is Download init event which will be executed when downloading initialize means it will run before downloading a file. It will provide you with downloadId, FileName, FilePath, FileSize

  • When the file is downloading this event will execute, Where you will get totalDownloaded in bytes, fileSize in bytes, speed in bytes, fileName, downloadId, downloadingLink which you can use as you want, You can use ConvertBytes to convert the given data to a human-readable format

on error

  • This Event will execute when you got any error, While downloading the file or doing other stuff with this extension, Here you will get the error parameter in the text format

  • This event will execute when downloading is completed successfully, It will return downloadId as a unique identifier.

  • This event will execute when any file is downloading and also to use this event you must have to enable Global Download, It will return totalDownloaded in the form of bytes and downloading current downloaded bytes which you can convert with ConvertBytes block, Note that it will combine the all downloaded bytes and currently downloaded bytes together.

  • This event will be executed when Downloading gets paused, It will return downloadId of the current downloading file.

  • This event will be executed when the download gets resumed. It will return a downloadId as a unique identifier for downloading the file.

  • This event will execute when the net pack limit is equal to or greater than the download limit set ( NOTE you must have to turn Net Usage Limit Enable to true and also recommended to set **Pause On Net Usage ** to enable too ), It will return downloadId as a unique identifier of a downloading file.

  • This Event will execute when you are resuming or downloading the file that is already downloaded.

got header

  • This event will run when you use the GetHeader block, It will return jsonData where you will get all the headers of the given URL.

got file details

  • This event will execute when you use the GetFileDetails block, which will return the JSON data which contains some fine details like file name, file size and file mimeType

get downloadIds

  • This block will help you to get downloaded or downloading Ids you can also get download ids even after completely closing the application or it is useful when you want to resume the download ( You can also use the same download link to resume download with download block )

file name by id

  • This block will help you to get FileName by download id, NOTE You can only use this block if downloading is started or resumed but if you use it in When Download Init then it won’t work if downloading is not resumed.

file path by id

  • This block will help you to get file path by downloading ID, Same condition is applied as FileNameByID ( NOTE You will only get file path without file name )

  • This block will help you to get downloading link by downloadId cause you wanted to store or show it to the user, Same condition is applied as FileNameByID

size by id

  • This block will help you to get the file size by using the download id in bytes, Same condition is applied as FileNameByID

  • This block will help you to get the progress or total downloadedBytes by download id in bytes, the Same condition is applied as FileNameByID

  • This block will help you to resume downloading by using download ID

download

  • This block will help you to download the file, You must have to provide the downloading URL and path to start downloading, ( NOTE: Do not pass the file name in the file path only pass that path where you wanted to download the file, the Custom file name is not supported yet )

pause by id

  • This block will help you to pause downloading by giving Download ID

  • This block will help you to cancel the downloading process by download id and also it will delete the file too.

clear all

  • This block will help you to clear all data saved in DB ( Not recommended to use only use in case of any error in DB )

get header

  • This block will help you to get a header from the given URL it will execute the GotHeader event (Sometimes you have some details only available on headers here you can get it, It makes a head request so if you are using your server then make sure to set head request enable )

gen dummy data

  • This block will help you to generate dummy data of a given path, ( In case some file is downloaded and not showing on the database you can use this to add the file to the database, Note you won’t be able to resume that file with download id you have to use different download link which contains same file name to resume the downloading )

convert bytes

  • This block will help you to convert bytes to human-readable formats like kb, MB, GB, TB, etc.

  • This block will help you to generate a random string of a specific length ( Note don’t use very big length it may crash your application you can use 500 or 1000 words but don’t use very big )

  • This block will help you to convert ms to human readable time only in the form of min and sec

convert time

  • This block will help you to Convert time to a human-readable time by a specific format e.g.
    time is 2018-09-10 22:01:00
    format is yyyy-MM-dd HH:mm:ss
    Output: Tue Sep 11 03:31:00 GTM +05:30 2018

get file details

  • This block will help you to get the file details by URL details like Name, MimeType, and Size, It will execute the GotFileDetails event

  • This block will help you to reset your internet usage limit in case the limit exceeds.

get refresh time

  • Get refresh time. What is refresh time?

    Well refresh time is a time in which you will be able to see the downloading in OnDownloading means the gap between downloading ( NOTE: Don’t set it too high it will not affect downloading but it will slow down the process of getting progress, And also don’t make it too less else it could crash your application 1 to 5 sec recommended )

  • This block will help you to set refresh time.

  • Return true if Net Usage Limit is enabled else false

  • Set net usage limit to enable or disable

get net usage limit

  • Get usage limit in Bytes

  • Set net usage limit in bytes

pause on net usage

  • Return true if pause on net usage is enabled else false

  • Set pause to enable or disable when monitoring net usage is enabled.

get global download

  • If GlobalDownload is enabled then it returns true else false.

  • Set global downloading enable or disable, If enable then it will execute the OnGlobalDownloading event.

NOTE: Make sure to read all the docs carefully to use this, if you found any error or bug then must contact the comment down below or dm me



DOWNLOAD LINK:


com.download.maiis.downloader.aix (101.7 KB)

3 Likes

OMG :sneezing_face::sparkles:
It’s just lit :heart_eyes::fire:
Keep going bruh @H4CK3R_5M4CK3R
Lot’s of love :heart:

4 Likes

Thanks bro I will do my best to provide more extension for Android Builder Community :grin:

3 Likes

@H4CK3R_5M4CK3R … bro super extension :two_hearts::two_hearts::two_hearts::two_hearts::two_hearts:

2 Likes

Please make demo aia on this extension

1 Like

Thanks :sweat_smile: well don’t know why i am not able to reply you before …

I am currently working on some other extensions so can’t provide now :no_mouth:

1 Like

my file is .mp4 but it is saving him in .jpeg how would i change this name

Can You make a demo aia please , i want a working of pause resume and cancel how do i use it

please make demo aia i want be able to do so and find its working it been a week but i couldnt found its working ?? demo aia or concept

1 Like

Do you found any way ???

I test it but it’s working in some URLs and most of the urls not work with this extension.
In some urls i got “permission denied” error

no , i dont found solution so i removed this

:grin:

I found, this is nice extension but one one thing isn’t good and that’s is its not downloading all urls .
Only specific urls accept and most of the urls ut says “permission denied”

I was previously offline for some time, but I am now back to work. I will make an effort to correct any errors and create a new version of this extension that is free from bugs or other issues as soon as possible :+1:

1 Like

thank you @H4CK3R_5M4CK3R Sir :sparkling_heart:,
pls provide demo aia file with extension update.

1 Like

yes sure I will do my best to add some more features in this extension and then provide aia with better docs to understand how to use it

1 Like

Thanks, i will help you by reporting some issues…
1 : It accept some urls and in some urls it says “permission denied” error( i mean for example if i downlod “save from net” website video than it start downloading but if i use url from another website than it says “permission denied” error.
2 : How we can set custom download id ? I mean if i press download button 2 times than if i want to pause 1st download by id than what is id ? how can i pause because it save second id and first remove.
3 : if i start downlod than close app from background and when open app than all downloads can’t start automatically.
please add automatic start by id block.
4 : add custom filename
5 : add custom notification with custom functions like progressbar,button list,lables etc…

2 Likes

Oki will thanks really for your feedback I’ll do my best to add features that you request and fix the erros

2 Likes

Hy please tell us did you make changes in this extension ? Because we are waiting and so excited for new update

2 Likes

Well, I am still waiting for Androidbuilder team to update the Androidbuilder 2.0 so that I can make it like that so it could work on that update because of some proguard issue …