Skip to main content
New Participant
May 12, 2023

Selecting a file in the file browser

I'm trying to get a file path with startActivityForResult and ACTION_OPEN_DOCUMENT.
The file browser opens. When I select a file, the file browser closes, but the universal menu is still open. In my code onActivityResult is never called.
Any idea why this is not working on the Quest 2? I already tried with enabling the WRITE_EXTERNAL_STORAGE permission. And I also tried ACTION_GET_CONTENT instead of ACTION_OPEN_DOCUMENT.
 

 

 

@Override
public void onCreate( Bundle savedInstanceState ) {
...
	Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
	intent.setType("*/*");
	startActivityForResult( intent, PICK_FILE_CODE );
}

@Override
public void onActivityResult( int requestCode, int resultCode, Intent data ) {
 // never gets called
}

 

 

 

1 reply

Participant
July 3, 2023

Having a very similar issue which is affecting a plugin I am using, as discussed in this other thread:
https://communityforums.atmeta.com/t5/Unity-VR-Development/What-s-the-working-file-browser-system-on-quest/m-p/1058448#M22182

Out of curiosity, and desperation 😥 did you figure out a solution to your issue?