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

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -