JoostPixnami Posted September 30, 2022 Share Posted September 30, 2022 We're able to access the external SD card on the Quest by adding: <application android:requestLegacyExternalStorage="true" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> This doesn't work for the Focus 3. I've tried placing an AndroidManifest file with these lines in Assets/Plugins/Android/AndroidManifest.xml and in Assets/WaveVR/Platform/Android/Customize/AndroidManifest.xml (as shown here:) But I still get an UnauthorizedAccessException. This does work in UE4 builds for the Focus but we're targeting API level 28, so before requestLegacyExternalStorage was added. Is there any way to get requestLegacyExternalStorage to work for the Focus? Or is there a different permission that can solve this issue? Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted October 4, 2022 Share Posted October 4, 2022 Hi @JoostPixnami, Are you trying to access the path /sdcard/ in Focus 3? Could you reference to this commit that I submit to OpenBrush? Let me know if you still have issues. Link to comment Share on other sites More sharing options...
JAMESJ Posted December 15, 2023 Share Posted December 15, 2023 Hi @VIVE_chengnay I 've follow your submit and try on XR Elite. There're 2 problems. 1. In OpenBrush, I've allowed the permission for access. But when I try to Export the paint result. It always show fail. 2. I've followed your step, but still can't access the download folder. (I would like to play video file in download folder). Please help me to fix the situation. Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted December 16, 2023 Share Posted December 16, 2023 Hi @JAMESJ, After you launch your app, did you see the popup window asking for permission? If yes, have you tried closing your app and try again? Could you list the version of Wave SDK that you installed in your project? Could you also provide your sample code on how you access the download folder? And, did you add permission to your AndroidManifest.xml? Link to comment Share on other sites More sharing options...
JAMESJ Posted December 16, 2023 Share Posted December 16, 2023 8 hours ago, VIVE_chengnay said: Hi @JAMESJ, After you launch your app, did you see the popup window asking for permission? If yes, have you tried closing your app and try again? Could you list the version of Wave SDK that you installed in your project? Could you also provide your sample code on how you access the download folder? And, did you add permission to your AndroidManifest.xml? @VIVE_chengnay Thanks for reply! About the OpenBrush, I use the pre-install one on device. I've got the permission and allow and tried relaunch the OpenBrush. But the Lab function export still fail. About my developing APP. 1. I use the latest Wave SDK 5.5. 2. I've added the permission to my AndroidManifest.xml. 3. After allowed the permission (It does show the popup window), I also try many times to relaunch the APP. 4. I use the Unity Asset AVPRO to play the mp4 video Or try the basic C# File IO to File.Copy the mp4 file to my APP folder. Both of the behavior are fail. It showed access fail. PS. I also try the File IO to check if the mp4 exist correctlly, the result is true. The file really exist. Compare to normal Android APP (Pixel 4 with Android 13), after allowed the permission. I could smoothly play the video from the download folder. Please help me to check the result. Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted December 17, 2023 Share Posted December 17, 2023 17 hours ago, JAMESJ said: But the Lab function export still fail For this issue, it is known issue and will be fixed in next release. As for read/write permission to Download folder, I will double check again on my side and get back to you ASAP. For the code that I previously shared, it is located in your app's files(/storage/emulated/0/Android/data/<packagename>/files) directory. Sorry for the inconvenience. UPDATE: Could you try adding android:requestLegacyExternalStorage="true" in your AndroidManifest.xml? I tried it and it is successfully writing file to /sdcard/Download folder. <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@style/Theme.WaveVR.Black" android:resizeableActivity="false" android:requestLegacyExternalStorage="true" tools:replace="android:theme"> <!--You can use your theme here.--> 1 Link to comment Share on other sites More sharing options...
JAMESJ Posted December 20, 2023 Share Posted December 20, 2023 @VIVE_chengnay Yes As try to get the OS version Android 10 API 29 I've add this line. after add this I could access the folder. Thank you! Maybe you could fix this via permission manager? android:requestLegacyExternalStorage="true" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now