Skip to content

e3bmo3ty/com.miga.downloadmanager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android DownloadManager support for Titanum

preview

Use the Android default DownloadManager to download files in the background. It will open the system download list when you click on the notification.

var dmg = require("com.miga.downloadmanager");

var filename = url.substring(url.lastIndexOf('/') + 1);
var file = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, filename).nativePath;

dmg.startDownload({
    url: url,
    filename: file,
    success: onDone,
    title: "Download",
    description: "Download " + filename
});

function onDone(){
	alert("done");
}

About

Use the Android DownloadManager in Titanium

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 73.1%
  • JavaScript 26.9%