UnauthorizedAccessException: ANDROID: when trying to access photos directory.

I want my app to retrieve photos taken from the camera, from android devices.

According to multiple sources, “/storage/sdcard0/Pictures” is a directory where photos are commonly found.

However, when the following line runs, UnauthorizedAccessException gets thrown.
Directory.GetFiles(“/storage/sdcard0/Pictures”);

My app doesn’t have the permission to access that directory.

What should I do so that I can access that directory?

Other question:
Besides “/storage/sdcard0/Pictures”, what other directories are photos commonly found in?

I’m 50/50 unsure whether to put it in the Android section or scripting section, so I’ll just put it here.

Chances are it’s a permission that you have to request in your manifest. If you don’t have the permission, you can’t access the folder. You’d probably have better luck in the Android section as I’m pretty certain it is a manifest permission issue.