I have already referred this link How to store files generated from app in "Downloads" folder of Android? And I am facing the same issue as mentioned in the Update1. I want the files to be saved in Download folder which is be seen directly from Home/Menu screen but it is saving in /storage/emulated/0/download My code:
File downloadDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
final String fileName = "test.pdf";
final File file = new File(downloadDir, fileName);
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file));
bos.write(response);
bos.flush();
bos.close();