cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to write a text file from the oculus quest and save it in the internal storage?

grismor
Honored Guest
I am creating a program for a research study and we need to record the answers that participants give. Since it is not connected to the computer we cannot use the Unity console nor create a text file on the computer. Therefore we need to create a file on the Quest, add to it when needed, and save it so that we can retrieve it when the quest is plugged into a computer. I have tried using Application.persistentDataPath and Application.dataPath but the file is no where to be found in the internal storage of the Quest.
5 REPLIES 5

chris_tmssn
Honored Guest
i have the same problem 😞 perhaps no permission to write on file system?

SuperDogoCoco
Honored Guest
I'm not sure if this is the problem but, have you installed an oculus go (compatible with quest) ADB driver? When the Quest is plugged in it needs to communicate with the computer and that's what the ADB driver is for. Here's the link if you need it. https://developer.oculus.com/downloads/package/oculus-go-adb-drivers/

chris_tmssn
Honored Guest


I'm not sure if this is the problem but, have you installed an oculus go (compatible with quest) ADB driver? When the Quest is plugged in it needs to communicate with the computer and that's what the ADB driver is for. Here's the link if you need it. https://developer.oculus.com/downloads/package/oculus-go-adb-drivers/


For me I don't think so... I have access through the file explorer and can install apk via adb. So that's working.
I create a File via script (File.WriteAllText(...)) and also I'm able load the data from it in the Application... so the file should be there, BUT if I connect the Quest to the PC, there isn't the saved file in the 'internalSharedStorage'/Android/data/'projectName'/files folder 😞

sealfoss
Explorer
So, I asked John Carmack on Twitter, here's his reply:

"You need the WRITE_EXTERNAL_STORAGE permission in your manifest, then you can write to /sdcard, which is what is visible when the HMD is plugged into a computer. Implementing some kind of cloud transfer would be more convenient for users."



el_jergas
Explorer
Wait, but if you do this the user will be asked for read permission! That's awful because they will (rightly) think that we can mess with their data. Is there no sandboxed folder for each app, where you don't even need for permission? I am thinking iOS for example.