How do you open a folder / directory

How do you open a directory on android? For windows I use Application.OpenURL() and put the directory path for the argument instead of a website URL but on android device this doesn’t do anything.
I’ve looked all over but can’t find an answer.
Appreciate any help. Thanks in advance.

Open it to do what with? Show a file browser? Android doesn’t really have a native file browser in the same sense Windows or Mac do. You’ll have to figure out what you actually want to do. You may have to build a UI yourself, or use an asset if you want to show the user the contents of a folder and have them able to select a file or something.

Feel free to search for “File browser” in the Unity Asset store.

I want to open a directory using an installed file browser.
I am using SimpleFileBrowser which works inside of my Unity app and on android for importing images etc., and it must possible because SimpleFileBrowser opens up and uses the same file browser I use day to day when adding a directory to the QuickLinks. Also this is exactly what OpenURL used to do until API level 7.

My app generates a collection of images and metadata splits them in to two folders and puts them in the Application.PersistentDataPath + “[project name]”. I’ve created a button which I want to open that folder so the user can manage the generated content.

It seems to use AndroidJavaObject.CallStatic to achieve this, I tried to replicate it to no avail. I’m sure someone has done something simular before, I’ve found a wrapper that will open files using the appropriate default apps to view gifs, PDF’s etc, but nothing to just open a directory using a filebrowser.

Start checking the logs with adb logcat.

Android has become far more restrictive as to how different apps access different parts of the filesystem, so additional metadata may need to be added to enable different programs to interoperate. That’s all Android reference stuff, absolutely nothing to do with Unity.