USB camera access
Ever since the HDMI viewer application and more so, the new permissions model for accessing headset cameras, we have been unable to use any USB cameras on the headset. Are there any plans for re-implementing access to this? The USB devices show up, but they cannot be used within their respective applications. It has been frustrating to say the least not being able to use the hardware I own on the hardware I own. I've tried various UVC USB cameras and none of them work. I get asked which application I want to use when plugging in the device the first time and the application will open when plugging it in but the application never gets access to the device like it used to.56Views2likes1CommentGame doesn't render after returning from android permissions
We have two permission requests at the start of the game: * Spatial permissions * Bluetooth permissions Sometimes after returning to the game after accepting these permissions nothing is rendered, but the game is still actually working. Music & sounds play, hand tracking works and you can press buttons, etc (though you can't see them). When you bring up the system menu/game title screen through the meta system hand pinch gesture and then "resume" the game, everything starts rendering again. Another issue that can happen (which seems related) is that after accepting the permission it doesn't return to the game, it brings up screen you get when you bring up the system menu. You then need to tap resume to continue the game. In our case you immediately get asked for the second permission and it'll return to the system menu again. This happens slightly more frequently than the issue above. We don't get both issues at the same time. The issue replicatable 50% of the time. Any advice would be highly appreciated. Cheers, Steven, Fantail Games.632Views0likes2CommentsUnable to give permission for All files access
I am currently working on an application that uses a specific document on the users device to transfer information and records between itself and different simmilar applications made by my team (imagine Game A storing its highscores in a shared document so Game B can read those same highscores and incorporate them in Game B). This methodologie allready works on the Hololens 2 which i have also developed for so i assumed it would work on the Quest 3 aswell. After doing some research i discovered that my best bet would be to try to get All File Access letting me access a shared directory between my different games. I found some code online that should help me ask for All Files Permission Access, as that isnt natively supported by unity itself. using var buildVersion = new AndroidJavaClass("android.os.Build$VERSION"); using var buildCodes = new AndroidJavaClass("android.os.Build$VERSION_CODES"); //Check SDK version > 29 if (buildVersion.GetStatic<int>("SDK_INT") > buildCodes.GetStatic<int>("Q")) { using var environment = new AndroidJavaClass("android.os.Environment"); //сhecking if permission already exists if (!environment.CallStatic<bool>("isExternalStorageManager")) { using var settings = new AndroidJavaClass("android.provider.Settings"); using var uri = new AndroidJavaClass("android.net.Uri"); using var unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); using var currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity"); using var parsedUri = uri.CallStatic<AndroidJavaObject>("parse", $"package:{Application.identifier}"); using var intent = new AndroidJavaObject("android.content.Intent", settings.GetStatic<string>("ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION"), parsedUri); currentActivity.Call("startActivity", intent); return true; } } return false; However after trying to ask for permission i am presented with the following screen. I am not able to manipulate the grayed out checkbox with my fingers or controllers. Is there something i did wrong?2.3KViews0likes3CommentsChange AndroidManifest.xml for AppLab submission.
I'm trying to get my app to be submitted into the AppLab, but I'm running into issues where no matter what I try, I always get those permissions active in my build: android.permission.READ_EXTERNAL_STORAGE android.permission.READ_MEDIA_AUDIO android.permission.READ_MEDIA_VIDEO android.permission.READ_MEDIA_IMAGES android.permission.ACCESS_MEDIA_LOCATION android.permission.READ_MEDIA_IMAGE android.permission.READ_MEDIA_VISUAL_USER_SELECTED My app currently does not use any of those permissions, but I am currently using Oculus Interaction SDK (The old integration), so I have two options, to delete all the code that is tied to those permissions, or use another straighter (to the point) solution like modifying the manifest directly, I tried the following code using custom AndroidManifest.xml file checked on Player Settings: <?xml version="1.0" encoding="utf-8" standalone="no"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.CompanyName.MyApp" xmlns:tools="http://schemas.android.com/tools"> <uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" tools:node="remove" /> <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" tools:node="remove" /> <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove" /> <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:node="remove" /> <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" tools:node="remove" /> <uses-permission android:name="android.permission.READ_MEDIA_IMAGE" tools:node="remove" /> <application android:label="@string/app_name" android:icon="@mipmap/app_icon" android:allowBackup="false"> <activity android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" android:launchMode="singleTask" android:name="com.unity3d.player.UnityPlayerActivity" android:excludeFromRecents="true" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" /> <meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only" /> <meta-data android:name="com.oculus.vr.focusaware" android:value="true"/> </application> <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" /> </manifest> But it simply did not work, not matter what I tried. I also tried building directly on Android Studio, but it did not work either. I don't know why the custom manifest is not working, well, actually it works but specifically the record audio part. <uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove" /> The other permissions simply stay there. I hope that maybe some good developer can help me with this issue. Unity version: 2021.3.30f1, Using this packages: Thank you very much for your patience 😊2.3KViews1like3CommentsMeta's documentation on how to remove android permissions for Unreal Projects is completely wrong
Hi everyone, I'm writing this in the hopes it proves useful for someone who may be having issues removing unwanted android permissions from their Unreal engine project. This is something I've struggled to do for a number of days and I've seen a lot of other people struggling with it, so I want to get this down for anyone with the same problem If you look at Meta's developer page here: https://developer.oculus.com/documentation/unreal/unreal-unwanted-manifest-permissions/ They tell you how to start a ManifestRequirementsOverride.txt document along with where to put it in your project. This part is correct. The part where it tells you to put the uses-sdk and uses-feature lines from your AndroidManifest.xml is also correct (though there may be more than one uses-features line in your manifest so double check that). What's wrong however, is it tells you to "Replace PERMISSION_NAME with the name of the unwanted Android permission". THIS IS INCORRECT! The permissions you put in the document are what WILL go into your project, and anything not included in ManifestRequirementsOverride.txt will NOT be in your project. Let's take a look at Unreal's documentation on this topic, the one page that mentions ManifestRequirementsOverride.txt is here: https://docs.unrealengine.com/5.3/en-US/android-settings-in-the-unreal-engine-project-settings/ In the "extra permissions" section it says "<Project>/Build/Android/ManifestRequirementsOverride.txt, will replace the entire Requirements section." Which is correct. The override file is not excluding the permissions listed in it, it's replacing that entire section of the manifest. I just compiled my project with the ManifestRequirementsAdditions.txt file devoid of any permissions and pushing that build to the Meta Quest Developer hub finally let me push without any permission warnings. I wanted to post this on the SDK feedback section, but I don't have "sufficient priveleges" to do so, so if someone can get this to the meta documentation team to check it would be really good.3.1KViews7likes3CommentsSecurityException when accessing Bluetooth API
I'm trying to access the Bluetooth API within a Unity project, but I end up with a SecurityException: 01-24 20:40:47.280 26380 26405 E Unity : AndroidJavaException: java.lang.SecurityException: Need BLUETOOTH permission: Neither user 10076 nor current process has android.permission.BLUETOOTH. 01-24 20:40:47.280 26380 26405 E Unity : java.lang.SecurityException: Need BLUETOOTH permission: Neither user 10076 nor current process has android.permission.BLUETOOTH. 01-24 20:40:47.280 26380 26405 E Unity : at android.os.Parcel.readException(Parcel.java:1692) 01-24 20:40:47.280 26380 26405 E Unity : at android.os.Parcel.readException(Parcel.java:1645) 01-24 20:40:47.280 26380 26405 E Unity : at android.bluetooth.IBluetooth$Stub$Proxy.isEnabled(IBluetooth.java:864) 01-24 20:40:47.280 26380 26405 E Unity : at android.bluetooth.BluetoothAdapter.isEnabled(BluetoothAdapter.java:622) 01-24 20:40:47.280 26380 26405 E Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method) 01-24 20:40:47.280 26380 26405 E Unity : at com.unity3d.player.UnityPlayer.access$300(Unknown Source) 01-24 20:40:47.280 26380 26405 E Unity : at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source) 01-24 20:40:47.280 26380 26405 E Unity : at android.os.Handler.dispatchMessage(Handler.java:98) 01-24 20:40:47.280 26380 26405 E Unity : at android.os.Looper.loop(Looper.java:154) 01-24 20:40:47.280 26380 26405 E Unity : at com.unity3d.player.UnityPlayer$e.run(Unknown Source) 01-24 20:40:47.280 26380 26405 E Unity : at UnityEngine.AndroidJNISafe.CheckException () [0x0008d] in /Users/bokken/buildslave/unity/build/Modules/AndroidJNI/AndroidJNISafe However, my AndroidManifest.xml lists all required permissions: <?xml version="1.0" encoding="utf-8" standalone="no"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto"> <application android:label="@string/app_name" android:icon="@mipmap/app_icon" android:allowBackup="false"> <activity android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" android:launchMode="singleTask" android:name="com.unity3d.player.UnityPlayerActivity" android:excludeFromRecents="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.INFO" /> </intent-filter> <meta-data android:name="com.oculus.vr.focusaware" android:value="true" /> </activity> <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" /> <meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only" /> <meta-data android:name="com.oculus.supportedDevices" android:value="quest|quest2" /> </application> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" /> </manifest> This is my simple test script which also asks for the FINE_LOCATION permission if necessary: void Start() { if (!Permission.HasUserAuthorizedPermission(Permission.FineLocation)) { Permission.RequestUserPermission(Permission.FineLocation); } else { AndroidJavaClass bluetooth = new AndroidJavaClass("android.bluetooth.BluetoothAdapter"); AndroidJavaObject bluetoothAdapter = bluetooth.CallStatic<AndroidJavaObject>("getDefaultAdapter"); if (!bluetoothAdapter.Call<bool>("isEnabled")) { bluetoothAdapter.Call<bool>("enable"); } AndroidJavaObject mBluetoothLeScanner = bluetoothAdapter.Call<AndroidJavaObject>("getBluetoothLeScanner"); ScanCallback scanCallback = new ScanCallback(); mBluetoothLeScanner.Call("startScan", scanCallback); } } Does anyone have success with accessing Bluetooth on the Quest from within a Unity project?11KViews1like13CommentsAndroid Permission Request Screen Text Not Appearing
We are using a less common Android permission request (REQUEST_IGNORE_BATTERY_OPTIMIZATIONS) in order to support downloading multiple large 360 videos to the Quest 2 (total ~30GB). This permission request appears in a different UI to the standard permissions, and we are finding that it only appears correctly approx 50% of the time. The other 50% of the time the permission prompt background appears, but without the text or buttons. This is causing issues as without accepting this permission, our downloads will fail. Looks like this when text doesn't appear: Should look like this: Given the size of the download, the user will take the headset off whilst the download completes. We require this permission in order to prevent the device from entering doze or app standby and killing the app/download manager. There is no error or log message shown in logcat when the dialogue does not display correctly. We’ve attempted various methods of requesting this permission and it still only appears 50% of the time. It also seems to open the Oculus Dashboard menu, so the app can’t be interacted with until the Oculus button is pressed to close the dash. Ideally, we'd like it to appear in the standard permissions screen shown below, or to appear in the current UI but with the text showing every time. Any ideas?985Views1like0CommentsCasting from Q2 to phone on secondary account?
My partner is the Admin/primary account on the Quest 2. He can connect his phone on the app and cast just fine, so I can watch him play from his phone. But if I want to play on my account, the secondary, he can’t watch me play. We can’t cast via my account on either of our phones. Both my phone and the oculus can find each other on Bluetooth but it may not fully connect. The 5-digit code to connect was found in the About tab on the admin account, but entering this code on my account on my phone is only intended to cast the oculus to his phone on his account. From what I gather from troubleshooting, only the admin account can cast. We would love to suggest to make a way for the admin to give permission to allow the secondary account to cast so players can take turns watching each other play and we can guide each other learning to use game features.3.3KViews6likes3CommentsProblem with MediaProjection and permission dialog
Hi Im new to oculus development (Oculus Quest 2) and im trying simple app for making screenshots and screen recording. But im having a problem with permission to retrieve MediaProjectionApi I start activity for result, and the standard android dialog for permission shows but, but without allow/deny buttons, so im stuck. This is the dialog, sorry for the phone pic, but build in screenshot does not show this dialog. Found simmilar issue here https://github.com/rom1v/sndcpy/issues/75 but no solution either. My code for showing this dialog. This is in my MainActivity and the testMediaProjectionPermission method is call as onClickListener from a button. ActivityResultLauncher<Intent> resultLauncher = registerForActivityResult( new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback<ActivityResult> () { @Override public void onActivityResult(ActivityResult result) { if(RESULT_OK == result.getResultCode()) { Log.d(TAG, "Media projection permission granted"); MediaProjectionManager mediaProjectionManager = (MediaProjectionManager) getSystemService(MEDIA_PROJECTION_SERVICE); MediaProjection mediaProjection = mediaProjectionManager.getMediaProjection(result.getResultCode(), result.getData()); Log.d(TAG, "Successfully retrieved mediPerojeciton="+mediaProjection); } } }); private void testMediaProjectionPermission(View view) { MediaProjectionManager mediaProjectionManager = (MediaProjectionManager) getSystemService(MEDIA_PROJECTION_SERVICE); resultLauncher.launch(mediaProjectionManager.createScreenCaptureIntent()); } Any advice would be appriciated. Any kind of workaround or another option to record screen other then the build in caster.Solved9.8KViews1like10CommentsNew Issue Accessing Expansion Files / AVPro video playback
I've had a new issue crop up in the last two weeks across multiple apps with videos failing to play. Previously everything worked fine. This has occurred in different apps after 1. Updating Oculus Integration to 28.0, and 2. Updating minimum Android build level to 23 The facts: Unity 2019.4.17f1 AVPro Video 1.x Have READ_EXTERNAL and WRITE_EXTERNAL in the manifest Calling videos from /sdcard/Android/obb/com.[org].[app]/ Have tried h.264, h.265, both as .mp4 and .mkv; have confirmed with videos I've gotten to play in other apps I've also gone into the app's Permissions in the Quest and though I requested Storage access in the manifest it was set to "Denied". Changed this to no effect. Does this have to do with the Oculus Native Video Player screwing with AVPro? Or is it a new permissions problem?Solved2.8KViews1like3Comments