yasirkula / UnitySimpleFileBrowser

A uGUI based runtime file browser for Unity 3D (draggable and resizable)
MIT License
851 stars 111 forks source link

Android can't view storage #32

Closed amirea closed 3 years ago

amirea commented 3 years ago

I'm not sure whether the culprit is my phone or a bug in SimpleFileBrowser but I suspect the Android. I need help to be able to use the asset.

Android 9. At the start of the app I use CheckPermissions() which returns "Denied". I then use RequestPermissions() and re-check. It again says "Denied". Android app permissions says no permissions are requested. The Load window left panel shows "Primary Drive" with the right one empty. Also tapping/double tapping "Primary Drive" does nothing. Still, an "up" button is present that when tapped twice it shows in the right panel: a numbered folder, "emulated", "enc_emulated" and "self". All are empty.

Android 10 Android app permissions says no permissions are allowed and no permissions are denied and CheckPermissions() returns "Denied" and after RequestPermissions() it's still "Denied". But after that, the Load window requested access to "Downloads" then to other locations as I browsed. These permissions are apparently saved from session to session but a new session start still shows "Denied".

How can I make it work on Android 9?

yasirkula commented 3 years ago

Did you set Write Permission to External (SDCard) in Player Settings?

amirea commented 3 years ago

Thank you, it was set to internal. Changing it to external solved the issue. I was aware of that setting but it didn't occur to me that it would matter. BTW, thank you for SimpleFileBrowser and for all the other Unity assets.

yasirkula commented 3 years ago

You are welcome!