hi this library helps you download a file with resume support
the third number in the method Download is start download from byte the file
NOTE:
this lib writes to append files so if you want to restart a download you must delete the old file before start downlod
this library supports only 1 download
add this line to your manifest:
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim dm As Downloading
End Sub
Sub Service_Create
dm.initialize("test")
End Sub
Sub Service_Start (StartingIntent As Intent)
dm.Download("http://xxxxx",File.DirRootExternal&"/test.zip",0)
End Sub
Sub Stop
dm.stop
End Sub
Sub test_DownloadStatus (Status As Long , Total As Long)
End Sub
Sub test_DownloadFinish (Success As Boolean)
End Sub
the third number in the method Download is start download from byte the file
NOTE:
this lib writes to append files so if you want to restart a download you must delete the old file before start downlod
this library supports only 1 download
add this line to your manifest:
B4X:
AddApplicationText(<service android:name="anywheresoftware.b4a.downloadmanager.DownloadService"/>)
Attachments
Last edited: