0
我正在从服务器下载图像并将其保存在内部存储器中。但我想隐藏图库中的这些图像。我怎样才能做到这一点?如何在Android中隐藏图库中的图像?
我听说命名文件夹.DirName
隐藏图像,但它不起作用在我的情况。 (电话不是源于)
public void myDownload(String myURL) {
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(myURL));
//request.setTitle("File Download");
//request.setDescription("Downloading....");
//request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI);
request.allowScanningByMediaScanner();
//request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_HIDDEN);
String nameOfFile = URLUtil.guessFileName(myURL, null, MimeTypeMap.getFileExtensionFromUrl(myURL));
//request.setDestinationInExternalPublicDir(Environment.getExternalStorageDirectory().getPath() + "/KiiTTimeTableData/" + year + "/" + branch + "/" + section + "/", nameOfFile);
//request.setDestinationInExternalPublicDir("/MyDataFinal/", nameOfFile);
request.setDestinationInExternalPublicDir("/KiiTTimeTableData/Data/", nameOfFile);
DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
manager.enqueue(request);
}