I just want to know how to get to the external dir in Kotlin
đź§µ 2
k
kevindmoore
08/14/2021, 9:34 PM
So, almost all of these directories are now protected. The only way to get access to them is to bring up a directory picker where the user gives permission to write to that directory
kevindmoore
08/14/2021, 9:35 PM
There is the DIRECTORY_DOWNLOADS field in Environment but I believe that won’t work on newer devices
o
Omotayo
08/14/2021, 9:38 PM
Thank you so much @kevindmoore
Omotayo
08/14/2021, 9:39 PM
I have tried passing the DIRECTORY_DOWNLOADS but got an error
k
kevindmoore
08/14/2021, 9:57 PM
I think you should be able to get the directory but you won’t be able to write to it due to permissions