I am using this code to download the file and I want to save the file into the another app's private data directory how I can do that?
private void initiateFileDownload(String fileUrl) {
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(fileUrl));
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
request.setTitle("File Download");
request.setDescription("Downloading file...");
String fileName = fileUrl.substring(fileUrl.lastIndexOf('/') + 1);
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fileName);
DownloadManager downloadManager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
downloadManager.enqueue(request);
}