Skip to main content
New Participant
June 14, 2023

What's the working file browser system on quest?

Hi all,

We tried both UnitySimpleFileBrower and UnityNativeFilePicker, encountered different issues.

UnitySimpleFileBrowser doesn’t show any folders except subfolders of Application.persistentDataPath. We want to access files in other address.

In UnityNativeFilePicker the method startActivityForResult invokes the intent ACTION_OPEN_DOCUMENT, which indeed opens the native file picker. But the result is never returned and the onActivityResult-method is never called. It works on an android phone thought.

Anyone get luck with other assets or we are missing something here?

This topic has been closed for replies.

6 replies

Participant
July 3, 2023

Also struggling with this and have been down the same paths it seems.
I will add that i found that the native file picker is able to return the selected file... but only after locking and unlocking the quest. I have no clue what could be causing that. Did you ever find a solution for your problem?

New Participant
July 3, 2023

Nope, I think there is no working solution for file picking on Quest yet.

Participant
July 3, 2023

Shame, it's very frustrating considering I can actually get the NativeFilePicker to work as long as I lock and unlock the quest. Something about the app's execution blocks that callback, but I can't for the life of me figure out what or how to stop that.

Participant
July 3, 2023

Also, in case anybody else stumbles on this thread, I will add another finding:
with NativeFilePicker, when I export a non-VR .apk from unity the file picking works without having to use the lock/unlock trick. It seems to be something specific to how the quest runs VR apps in particular.

Up and Coming
October 15, 2023

I have been trying to solve this problem for a while now as well. But finally figured out a solution. While browsing the Unity forums I found that someone in the NativeFilePicker thread had this issue and linked another asset that solved his problem, an asset by the same author even and its also free:
https://forum.unity.com/threads/native-file-picker-for-android-ios-open-source.912890/page-3

What he suggests using instead is the Runtime Filebrowser or Simple File Browser:
https://github.com/yasirkula/UnitySimpleFileBrowser

The github page links the asset store as well where it can be downloaded for free also. I did not think this asset supported Android as well, but it does.
There is this issue to note though, it has been solved, but the Start method should be changed to Awake and you should add the code suggested here:
https://github.com/yasirkula/UnitySimpleFileBrowser/issues/87

But also you need to update the SimpleFileBrowserCanvas as it is not setup for VR. It can be found in "Assets\Plugins\SimpleFileBrowser". It needs to be changed to world space in its render mode and the scale should be adjusted. I changed it to 0.0048 in x, y and z. Experiment a bit.
Also give it a TrackedDeviceGraphicRaycaster so it can be interacted with in VR, and I am not sure if it helped but I found the disabled Eventsystem and updated its input system to something newer Unity has now that I suspect works better with VR and XR.

Not sure if maybe there is a way to always make this pop up in front of you because by default it has a specific world space position which is not very practical.


paulcool88
Inspiring
May 18, 2024

This simple file browser has the same problem as the native file picker. When you click browse and  then select a folder from the native popup, it gets stuck when you exit the popup. The solution he proposes is basically reverting to the old file system. It will work on movie/image/sound files if you have read permissions for them, but not otherwise.

I can make the native browser work in a hacky sort of way if I press the oculus key after leaving the popup. It goes straight back to my app. It seems like the app is being left suspended. It seems like I should be able to call some of native android function to bring my app back to focus but haven't had any luck yet finding one. I found this link https://stackoverflow.com/questions/38452198/move-app-from-background-to-foreground-using-its-package-name-and-movetasktofro  and tried to use the information there but so far it isn't working for me.