I am getting
open failed:
EACCES (Permission denied)
on the line OutputStream myOutput = new FileOutputStream
Be aware that the solution:
Is temporary, sooner or later your app should be migrated to use Scoped Storage
.
In Android 10, you can use the suggested solution to bypass the system restrictions, but in Android 11 (R) it is mandatory to use scoped storage
, and your app might break if you kept using the old logic!
This video might be a good help.