Use Android-query to download and save files locally ., Android image saved locally
The entire project uses the Android-query framework.
You need to download the file.
Essay: it facilitates the next search and use.
Only official documents are copied.
File
String url = "https://picasaweb.google.com/data/feed/base/featured?max-results=8";
aq.progress(R.id.progress).ajax(url, File.class, new AjaxCallback<File>(){
public void callback(String url, File file, AjaxStatus status) {
if(file != null){
showResult("File:" + file.length() + ":" + file, status);
}else{
showResult("Failed", status);
}
}
});
File Download
If you can specify where to store the downloaded file with the download () method. Note that these files will not be deleted like cached files.
String url = "https://picasaweb.google.com/data/feed/base/featured?max-results=16";
File ext = Environment.getExternalStorageDirectory();
File target = new File(ext, "aquery/myfolder/photos.xml");
aq.progress(R.id.progress).download(url, target, new AjaxCallback<File>(){
public void callback(String url, File file, AjaxStatus status) {
if(file != null){
showResult("File:" + file.length() + ":" + file, status);
}else{
showResult("Failed", status);
}
}
});