User Tools

Site Tools


built_in:downloader

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

built_in:downloader [2015/01/08 14:13]
thomaskwd
built_in:downloader [2018/04/19 23:14]
Line 1: Line 1:
-====== Downloader ====== 
  
-For downloading files (including zip files) //direct to sdcard//, you can use the app.CreateDownloader() method like this: 
- 
-===== Methods ===== 
-^Method ^Description ^ 
-|Downloader.Download() |You can pass a comma seperated list of file urls to download. | 
-|Downloader.IsComplete() | | 
-|Downloader.GetProgress() | | 
-|Downloader.GetSize() | | 
-|Downloader.SetOnComplete(callback) | | 
- 
-Example code snippet: 
-<code> 
-dload = app.CreateDownloader(); 
-dload.SetOnComplete( dload_OnComplete ); 
-dload.Download( srcFileUrl, targetDir ); 
- 
-function dload_OnComplete() { 
-    // we know download is ready now 
-    // (but not if success or not) 
-} 
- 
-</code> 
- 
-Thanks to Dave (forum: https://groups.google.com/d/msg/androidscript/1_SnH886xT4/OlDVPxZ5bDwJ) 
built_in/downloader.txt ยท Last modified: 2018/04/19 23:14 (external edit)