This is a wrapper for this project.
An android view showing a download progressBar, total size, downloadedSize, percentage downloaded and a cancel button of the android DownloadManager with just few lines of code. Just like Google Play downloading...
Downloads made by this library uses the Android Downloadmanager (Systemservice).
But additional to the Notificationprogress you got you also can show the progress inside own app.
DownloadProgress
Version: 1.02
Please note: The STRING you can set with ProgressBarMode or ProgressBarProgressMode is the Porter-Duff-Mode.
In this case the ADD, CLEAR, DARKEN, DST, and so forth, can be used when setting the Mode (just use them as String... ADD -> "ADD")
If you want to donate for my work building the wrapper you can do it here:
Known issues:
As of yet it downloads all files to the internal FILES dir (ASSETS). On my device it works but i dont know about other devices. Working on it to make it changeable. Hopefully this weekend i will release a update.
Please note the changes in the manifest in example.
Dont forget to add
An android view showing a download progressBar, total size, downloadedSize, percentage downloaded and a cancel button of the android DownloadManager with just few lines of code. Just like Google Play downloading...
Downloads made by this library uses the Android Downloadmanager (Systemservice).
But additional to the Notificationprogress you got you also can show the progress inside own app.
DownloadProgress
Version: 1.02
- DownloadProgressView
Events:- DownloadCancelled (downloadURL As String)
- DownloadFailed (downloadURL As String, reason As Int)
- DownloadProgress (downloadURL As String, bytes_downloaded As Long, bytes_total As Long, download_percentage As Long)
- DownloadSuccessful (downloadURL As String)
- ba As BA
- AddToParent (Parent As ViewGroup, left As Int, top As Int, width As Int, height As Int)
- BringToFront
- DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
- Initialize (EventName As String)
- Invalidate
- Invalidate2 (arg0 As Rect)
- Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- IsInitialized As Boolean
- RemoveView
- RequestFocus As Boolean
- SendToBack
- SetBackgroundImage (arg0 As Bitmap)
- SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
- SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
- SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
- SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
- download (url As String, title As String, description As String, DestinationFilename As String)
This method initialize and shows the downloadProgressView.
downloadID: the downloadID gotten when a download was enqueued.
downloadStatusListener: the downloadStatusListener to monitor when download is successful,
failed, cancelled.
- android.permission.ACCESS_NETWORK_STATE
- android.permission.INTERNET
- Background As Drawable
- Color As Int [write only]
- DownloadedSizeColor As Int
This method returns the color of the downloadedSize TextView. - Enabled As Boolean
- Height As Int
- Left As Int
- PercentageColor As Int
This method returns the color of the percentage TextView. - ProgressBarColor As Int [write only]
This method sets the color of the progressBar. - ProgressBarMode As String [write only]
This method sets the mode of the progressBar. - ProgressBarProgressColor As Int [write only]
This method sets the 2nd color of the progressBar. - ProgressBarProgressMode As String [write only]
This method sets the 2nr mode of the progressBar. - Tag As Object
- Top As Int
- TotalSizeColor As Int
This method returns the color of the totalSize TextView. - Visible As Boolean
- Width As Int
Please note: The STRING you can set with ProgressBarMode or ProgressBarProgressMode is the Porter-Duff-Mode.
In this case the ADD, CLEAR, DARKEN, DST, and so forth, can be used when setting the Mode (just use them as String... ADD -> "ADD")
If you want to donate for my work building the wrapper you can do it here:
Known issues:
As of yet it downloads all files to the internal FILES dir (ASSETS). On my device it works but i dont know about other devices. Working on it to make it changeable. Hopefully this weekend i will release a update.
Please note the changes in the manifest in example.
Dont forget to add
to your manifestAddPermission(android.permission.INTERNET) ' Allows applications to open network sockets.
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE) ' Allows an application to write to external storage.
Attachments
Last edited: