
This list includes additional information about downloaded files like file size, download status, estimated time to complete, current download speed and download description. When I pressed OK button, it proceed to PDF Reader, a few milisecond, it kick me back to the apps.The main window shows a list of downloaded files. Val uri = is the Logcat I/?: uriString:: file:///storage/emulated/0/Download/MBITION/ICT600%20-%20Chapter%203-9.pdf Val urlFixer = uriString.replace("file://","") I tried to remove file:// by using replace like below: val uriString: String = c.getString(c.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI)) : Failed to find configured root that contains /file:/storage/emulated/0/Download/MBITION/ICT600%20-%20Chapter%203.pdfĪt $SimplePathStrategy.getUriForFile(FileProvider.java:800)Īt .getUriForFile(FileProvider.java:442)Īt .NoteActivity$onCompleteDownloadFile$1$onReceive$1.invoke(NoteActivity.kt:79) Image below shows where the file is located inside the MBITION folder.īelow is the error I got from Logcat. I tried to open the file through the DownloadManager's Notification. If (DownloadManager.ACTION_DOWNLOAD_COMPLETE = action) catch (e: ActivityNotFoundException) need to download PDF reader"īelow shows the Logcat.

As you can see codes below, this is where after I got the downloadUrl as url.ĭownloadManager = getSystemService(DOWNLOAD_SERVICE) as DownloadManager.I am using DownloadManager to download a file from FirebaseStorage.įirst, I will get the downloadUrl from FirebaseStorage and proceed with DownloadManager
