Downloader returns a Downloader object.
For more information in the detailed docs see CreateDownloader
dwn = app.CreateDownloader(
options ) →
app object - Downloader
Example - Example
function OnStart()
{
var srcFileUrl="http://sgarman.net/downloadable.txt";
var targetDir="/sdcard";
dload = app.CreateDownloader();
dload.SetOnComplete( dload_OnComplete );
dload.Download( srcFileUrl, targetDir );
}
function dload_OnComplete()
{
app.ShowPopup("Download complete");
}
The following methods are available on the Downloader object:
unknown
string: url path
string: path to file or folder ( "/absolute/..." or "relative/..." )
string
Download file
get current download progress
get target download size
Returns the control class name.
return whether download compleated or not
string: comma separated: "boolean", "char", "byte", "short", "int", "long", "float", "double"
Allows access to other functions defined on the object in Java via reflection.
function()
? called when download cancelled
function()
called when download finished
?
called when error occurred while downloading