How to get around Android permission ACCESS_MEDIA_LOCATION in Unity?
I'm preparing to submit my Quest app but as usual, I'm dealing with getting through Android permission. I get the usual external storage and microphone permissions but those are somewhat easy to find the source by searching for "Microphone." fields in Unity. In fact, most seem to come from Oculus' Platform scripts. The permission that I can't seem to figure out the source is ACCESS_MEDIA_LOCATION. My project doesn't include any external packages nor is attempting to access photos or file metadata. I'm aware that I'm able to remove permissions by hand through Android studio but the issue with this solution is that since I'm not sure where the source of the permission comes from, I'd be open to getting a bug on the app at some point by simply removing this permission. Does anyone know what sorts of classes prompt Unity to add this permission or its source? Are there any solutions other than to simply remove the permission request from the manifest after building the project? Are you having the same issue?Solved6.8KViews1like5CommentsDelay in Passthrough Camera Feed Versus Virtual World in Unity with XR All-in-One Plugin
0 I am developing a mixed reality application in Unity using the XR All-in-One plugin from the Unity Store with a target device being the Quest 3. I've successfully integrated the RigCamera, Hands, and Controllers tracking, as well as enabled passthrough using BuildingBlocks. However, I'm experiencing a noticeable delay in the passthrough feed from the real world — about half a second — while the virtual world interactions remain at full speed, causing a mismatch between the two. Steps I've taken so far: Ensured all configurations in 'Project Settings -> Meta XR' are correct. Updated the project settings for Android build. Tested with Unity version 2022.3.20f1 LTS, as recommended by Meta. Enabled passthrough in the Oculus properties app I've also recorded a video demonstrating the issue. You can see how the virtual hands or/and controller react immediately when I move in the real world. However, the passthrough is really slow, causing this mismatch I have been talking about. Does anyone know how to synchronize the passthrough feed with the virtual world and eliminate this delay? Any advice or insights would be greatly appreciated as I am really lost where the problem is coming from.1.6KViews2likes3CommentsBluetooth connection between Quests headsets
Hello everyone, i develop a Unity XR app for Meta Quest and i want to connect 2 quests for local communication between quests. So i use bluetooth API by Google Android to connect the 2 Quest. (android.bluetooth.BluetoothAdapter android.bluetooth.BluetoothDevice android.bluetooth.BluetoothServerSocket android.bluetooth.BluetoothSocket) But i have a problem, when i try to pair a Quest in the Meta Quest Bluetooth settings, the pairing works but after 2 seconds, the connected Quest changes from "Connected Devices" to "Already connected", it is normal ? Another question is why there is 2 "Meta Quest 3" devices in the list, one with an Smartphone icon and another with a "Bluetooth" icon, which bluetooth device i have to choose ? Thank you959Views0likes1CommentUnity app crushes when trying to launch it from another app (Oculus Quest 2)
Hello. I have a build of my VR Unity app for Oculus Quest 2 and it starts and works just fine. In addition for this app I have a launcher - an android 2D app that was written using .NET MAUI framework. This launcher allows to start Unity app by clicking "Launch" button. Here is button handler code: static partial void PLaunch() { PackageManager packageManager = Android.App.Application.Context.PackageManager; Intent intent = packageManager.GetLaunchIntentForPackage(MainPage.appPackageName); MainActivity.Instance.StartActivity(intent); } With VR headsets from another companies this handler works as expected. It launches my Unity app as if it was launched directly. But in case of Oculus Quest 2 it tries to launch my Unity app inside of launcher window as 2D app and then it crushes. I want to figure out how to fix it. Here is device logs for two scenarios: direct_app_launch.txt - Unity app launches directly (works ok): https://drive.google.com/file/d/1kIGc_p14XDXfwghB8ernp3QY7szBWg6L/view?usp=drive_link launcher_app_launch.txt - Unity app launches using launcher (crash happening): https://drive.google.com/file/d/1b3EaeV5-rWFZLmOotM36YpGacG4EEmtT/view?usp=drive_link Package names Unity app: com.stemgames.vics.studio launcher: com.stemgames.vics_science_studio_launcher I will appreceate any help with this issue.434Views0likes0CommentsPatch an APK from within a APK
Hi all, I'm new to Meta Quest 2, Meta Quest 3 and android development. So far I've been using Unity 3D to create VR applications. I am looking for a way to patch the changes in an installed APK from within the APK. So the flow which I have is this: On app load, check for any updates. If update is found, download it and shows progress. On completion, the app closes and patching begins. After patch update, the APK starts again. I've seen this flow before in few mobile APK's but since I am a clean slate in android development, I don't know where to look for or how to start. I just want to do away from the oculus developer hub. Any suggestions or help are welcome. Thank you1.7KViews0likes2CommentsRequesting permissions not working in Quest OS 59
Since we updated one of our Quest 2 devices to operating system version 59 our android code for requesting permissions no longer works. private void checkPermissionsAndInitialize() { // check permissions List<String> PERMISSIONS = buildPermissionList(); if (mainActivity.hasPermissions(PERMISSIONS.toArray(new String[0]))) { intialize(); } else { ActivityCompat.requestPermissions(mainActivity, PERMISSIONS.toArray(new String[0]), PERMISSIONS_REQUEST_CODE); } } @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); intialize(); } private void intialize() { Log.d(LOG_TAG, "Build version: " + Build.VERSION.SDK_INT); } This snippet should be straightforward but for some reason the if statement always evaluates to false and onRequestPermissionsResult is never called, so the log is never printed. (The 'hasPermissions' method just uses ActivityCompat.checkSelfPermission on an array.) Also, using 'adb install -g' to grant all runtime permissions doesn't work either! Has anyone had a problem like this before? LucasSolved2.6KViews0likes3CommentsLink/Editor keyboard
Hi everyone! Sorry if this post is a duplicate. I'm searching for a way to display/get the keyboard inputs during a Link session and the Unity Playmode. We are not able to use the Unity TouchScreenKeyboard as it seems only compatible with Android/iOS and Windows Store Apps. I would be glad if someone knows a built-in solution as we need the multiple languages support which is not an easy task to implement. Thank your for your time!990Views1like1CommentIssues with the APK during validation
I'm having problems with my app's Manifest, I want to publish it on the ALPHA channel, but when building I get errors, even using "Create store-compatible AndroidManifest.xml" I tried to debug, I added: |android:exported="true"| and |android:installLocation="auto"| in the Manifest, I was able to build it, but I couldn't upload it. OVR Platform Tool log: NOTE: Your manifest includes the following permissions restricted by Oculus: - android.permission.RECORD_AUDIO - android.permission.MODIFY_AUDIO_SETTINGS Please remove these permissions if they are not needed by your application. If they are needed, you must include justification in the “Notes for the Reviewer” field when submitting your application for review. Failure to provide justification will result in the rejection of your application. This app contains both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) libraries. This consumes extra storage and increases download times. Consider updating your build to target 64-bit only. Preparing for upload... Uploading APK... Uploading... Waiting for processing to begin... rebuilding uploaded file (1/3) validating package contents (2 / 3) ERROR: We found issues with the APK during validation. Please check that the APK meets the `Application Manifest Requirements` and then resubmit your app. * APK install location must be "automatic" (android:installLocation in AndroidManifest.xml). Read the documentation at: https://developer.oculus.com/distribute/publish-mobile-manifest/ Even with |android:installLocation="auto"| I still get this error. What can I do? I need the microphone because I'm using Photon Voice My Manifest: <?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" 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" /> </application> <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" /> <uses-feature android:name="com.oculus.feature.PASSTHROUGH" android:required="true" /> </manifest> UPDATE: It looks like it's a bug from Unity, I was able to upload my APK using the workaround in the comments of this post: https://issuetracker.unity3d.com/issues/android-install-location-changes-when-exporting-project1.5KViews0likes0CommentsGame crashes when recording (If relating to logs)
Like 28 peoples game crashed due to an error: android_crash:android.app.BackgroundServiceStartNotAllowedException:com.oculus.vrapi.ScreenCaptureHelper.advertiseStreamablePackage Stack Trace java.lang.Error: FATAL EXCEPTION [Thread-3] Unity version : 2021.3.25f1 Device model : Oculus Quest Device fingerprint: oculus/hollywood/hollywood:12/SQ3A.220605.009.A1/50500320057200150:user/release-keys Build Type : Release Scripting Backend : IL2CPP ABI : arm64-v8a Strip Engine Code : true Caused by: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=SET_METACAM_PACKAGE_NAME cmp=com.oculus.metacam/.capture.CaptureService (has extras) }: app is in background uid UidRecord{c77b0c3 u0a93 CEM bg:+1m47s574ms idle change:idle procs:0 seq(0,0,0)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1870) at android.app.ContextImpl.startService(ContextImpl.java:1826) at android.content.ContextWrapper.startService(ContextWrapper.java:776) at com.oculus.vrapi.ScreenCaptureHelper.advertiseStreamablePackage(:47) Any thoughts?728Views1like0CommentsHow to launch installed oculus app from browser using android intent?
Hi, I have tried opening app from my website using android intent it is not launching the app. Does the oculus browser restricting to access .xml file? if it is, then what would be the better way to open app from a link? This method is working in android phone but not in oculus. I am stuck here for the past 15 days any suggestion would be really helpful. Here is my manifest look like: <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.INFO" /> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="unitydl" android:host="mylink" /> </intent-filter> and this is what HTML code like: <html> <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> </head> <body > <h1>My Deep Link Test page</h1> <p><a href="unitydl://mylink">Launch</a></p> <p><a href="unitydl://mylink?parameter">Launch with Parameter</a></p> </body> </html>1.1KViews1like0Comments