Skip to main content
New Participant
February 8, 2022

Permission denied on accessing storage even though I gave it

I'm trying to call Directory.EnumerateFiles on "storage/emulated/0/Android".

 

In unity I called

if (!Permission.HasUserAuthorizedPermission(Permission.ExternalStorageRead))
{
   Permission.RequestUserPermission(Permission.ExternalStorageRead);
}

And then the permissions window appeared and I hit allow.

 

Yet when I call EnumerateFiles, I'm told "IOException: Permission Denied"

 

    This topic has been closed for replies.