So, I'm implementing download manager to download pdf files and save it on specific folder. But, what happened is android download manager is download the file, then create a folder, and theres also the same file there and outside of it. But when i delete one of them, lets say John_Pdf on root download folder, the one on partner-wht is also gone.
val downloadManager = context.getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
for (i in downloadUrl.indices) {
val request = DownloadManager.Request(Uri.parse(exampleURL))
.setTitle("Document")
.setDestinationInExternalPublicDir(
Environment.DIRECTORY_DOWNLOADS,
"doc" + File.separator + "document"
)
.setMimeType("application/pdf")
.setDescription("Downloading Report")
.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)
.setAllowedOverMetered(true)
.setAllowedOverRoaming(true)
downloadManager.enqueue(request)

