android - Download Files By Using AQuery Library -
i ussuing aquery , tring use library dowbload files dont understand how use it.
thats sample code , don't understand it.
aq.download(string url, file target, object handler, string callback)
how derfine "object handler" , "string callback" ?
you can try way
file ext = environment.getexternalstoragedirectory(); file target = new file(ext, "image/test.jpg"); aq.download(imageurl, target, new ajaxcallback<file>(){ public void callback(string url, file file, ajaxstatus status) { if(file != null){ toast.maketext(getapplicationcontext(), "file:" + file.length() + ":" +file+"-"+status, toast.length_long).show(); }else{ toast.maketext(getapplicationcontext(), "download failed", toast.length_long).show(); } } });
Comments
Post a Comment