cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting a file in the file browser

ireneRK
Honored Guest
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 1

chronicbite
Explorer

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...

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