I am calling
ActivityCompat.checkSelfPermission(activity, "android.permission.WRITE_EXTERNAL_STORAGE") on a directory returned by
PERMISSION_GRANTED but when I try to write to the storage, I get permission denied. This happens only in API level 29. In API 28 or less, everything works as expected. Why does
checkSelfPermission return GRANTED but it is actually not granted?
And on Android 10 file paths outside of your App’s private directories are worthless.
Going forward it is probably best just to use Media Store or Storage Access Framework
The reason why is that permission is still used see see table https://developer.android.com/training/data-storage but only for the MediaStore API