Forum Widgets
Recent Discussions
Spatial SDK and Passthrough Camera Access
Can I get a passthrough camera stream open while running the Spatial SDK? I modified the Starter Template (https://github.com/meta-quest/Meta-Spatial-SDK-Templates/tree/main/StarterTemplate/app) just to open the camera but it seems to cause the camera to disconnected immediately. I added a startCamera method to run when one of the panels is selected (instead of running the video): private fun startCamera() { if (checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) { Log.i("MainActivity", "Camera permission not granted") } if (checkSelfPermission("horizonos.permission.HEADSET_CAMERA") != PackageManager.PERMISSION_GRANTED) { Log.i("MainActivity", "horizonos.permission.HEADSET_CAMERA permission not granted") } val cameraManager: CameraManager = getSystemService(Context.CAMERA_SERVICE) as CameraManager val cameraIds: Array = cameraManager.cameraIdList var cameraId: String = "" for (id in cameraIds) { Log.i("MainActivity", "Camera ID: $id") val cameraCharacteristics = cameraManager.getCameraCharacteristics(id) if(cameraCharacteristics.get(Key("com.meta.extra_metadata.camera_source", Int::class.java)) == 0) { cameraId = id continue } } cameraManager.openCamera(cameraId, cameraStateCallback, Handler(Looper.getMainLooper())) } All permissions are good but it just fails: 2025-09-12 14:36:20.269 11285-11285 MainActivity com...atial.samples.startertemplate I All permissions already granted 2025-09-12 14:36:20.271 11285-11285 MainActivity com...atial.samples.startertemplate I Camera ID: 1 2025-09-12 14:36:20.278 11285-11285 MainActivity com...atial.samples.startertemplate I Camera ID: 50 2025-09-12 14:36:20.279 11285-11285 MainActivity com...atial.samples.startertemplate I Camera ID: 51 2025-09-12 14:36:20.299 1402-1402 CameraAccessController system_server E Failed to injectCamera for cameraId:51 package:com.meta.spatial.samples.startertemplate (Ask Gemini) android.hardware.camera2.CameraAccessException: CAMERA_DISCONNECTED (2): injectCamera:3274: No camera device with ID "" currently available Am I missing something, can this work?Solvedmeteorik4 months agoHonored Guest122Views0likes1CommentVR Screen Navigation
Hi Team, I am struggling to perform screen navigation from a VR screen to another VR screen. I checked the samples but could not get any clue. Is it even supported or do we have to survive with loading different scenes in the launcher activity itself? Yes, I have added the activity in the manifest file and it works when I make that 2nd activity as launcher. However when I try to launch it from the 1st activity it simply crashes. This is the error I get ... FATAL EXCEPTION: main Process: com.mixed.reality.factory, PID: 26659 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mixed.reality.factory/com.mixed.reality.factory.LoaderQuestActivity}: java.lang.Exception: Native Assert. FILE=icsHE/GraphicsHorizon.cpp:161 MSG= at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3807) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3947) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2468) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:218) at android.os.Looper.loop(Looper.java:310) at android.app.ActivityThread.main(ActivityThread.java:8250) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978) Caused by: java.lang.Exception: Native Assert. FILE=icsHE/GraphicsHorizon.cpp:161 MSG= at com.meta.spatial.core.SpatialInterface.nativeInit(Native Method) at com.meta.spatial.core.SpatialInterface.init(SpatialInterface.kt:134) at com.meta.spatial.runtime.VrActivity.onCreate(VrActivity.kt:223) at com.meta.spatial.toolkit.AppSystemActivity.onCreate(AppSystemActivity.kt:56) at com.mixed.reality.factory.LoaderQuestActivity.onCreate(LoaderQuestActivity.kt:59) at android.app.Activity.performCreate(Activity.java:8636) at android.app.Activity.performCreate(Activity.java:8614) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3789) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3947) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2468) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:218) at android.os.Looper.loop(Looper.java:310) at android.app.ActivityThread.main(ActivityThread.java:8250) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978) Any help would be highly appreciated.egrabhishek4 months agoExplorer45Views0likes0CommentsWhere anatomically is the HEAD joint
Not much detail here: https://developers.meta.com/horizon/reference/spatial-sdk/v0.7.0/root/com.meta.spatial.toolkit/body-joint/h-e-a-d Is it directly above where the spine meets the skull and behind the eyes? i.e. the "head atlas"? Is this a good pivot point for billboarding view screens?waynecochran4 months agoProtege90Views0likes3CommentsKeep Rules in Proguard Files (Using R8 Minify)
I'm developing an Immersive App for Meta Quest using the Meta Spatial SDK in Android Studio with R8 minification enabled. When building a signed APK, I encounter the following error: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in D:\AndroidProject\[package-name]\app\build\outputs\mapping\questRelease\missing_rules.txt. Missing class horizonos.app.container.TaskContainer (referenced from: horizonos.app.container.TaskContainer com.meta.spatial.runtime.PanelDisplay.taskContainer and 4 other contexts) Missing class horizonos.app.container.TaskContainerManager$TaskContainerCallback (referenced from: horizonos.app.container.TaskContainer com.meta.spatial.runtime.PanelDisplay.tryGetTaskContainer(android.content.Context, android.content.Context) and 2 other contexts) Missing class horizonos.app.container.TaskContainerManager (referenced from: horizonos.app.container.TaskContainer com.meta.spatial.runtime.PanelDisplay.tryGetTaskContainer(android.content.Context, android.content.Context)) Missing class vros.os.VrosBuild (referenced from: horizonos.app.container.TaskContainer com.meta.spatial.runtime.PanelDisplay.tryGetTaskContainer(android.content.Context, android.content.Context)) The missing_rules.txt file suggests adding the following rules to proguard-rules.pro: # Please add these rules to your existing keep rules in order to suppress warnings. # This is generated automatically by the Android Gradle plugin. -dontwarn horizonos.app.container.TaskContainer -dontwarn horizonos.app.container.TaskContainerManager$TaskContainerCallback -dontwarn horizonos.app.container.TaskContainerManager -dontwarn vros.os.VrosBuild When I add these -dontwarn rules to proguard-rules.pro, the signed APK builds successfully. However, when I deploy and launch the APK on a Meta Quest device, the app gets stuck in a loading state and eventually shows a "Not Responding" error after some time. I’ve also tried the following keep rules in proguard-rules.pro, but they prevent the APK from building: -keep class horizonos.** { *; } -keep class vros.** { *; } -keep class com.meta.spatial.** { *; } My question: What specific keep rules should I use in proguard-rules.pro to ensure that the necessary classes are preserved, allowing the app to build successfully and load properly on Meta Quest without getting stuck in the loading state?SolvedlucyAlvin6 months agoHonored Guest93Views0likes2CommentsInterface of getting Controller joystick travel range
Hello, I’m fairly new to the Meta Spatial SDK, and while reviewing the Controller Input documentation, I couldn’t find any interface that allows retrieving the joystick’s travel range. What I came across were examples treating joystick directions as “Buttons” (like ButtonThumbRL). However, what I’m trying to do is map the joystick’s travel to an attribute like “velocity.” Is there any way to access this information? If I’ve missed something, my apologies, thank you!xiayip6 months agoExplorer219Views0likes5CommentsRun every frame vs. every tick?
Is there a way to run a method in an activity once every frame instead of every tick? I'm aware that Systems exist, but they seem to be tied to the activity tick rate. Side note, my system also seems to not consistently run at 90 ticks per second even though the contents of its execute() method take less than 11ms consistently. I'm running a simple project with this system in it and nothing else-- the tick rate jumps between 45 and 90 sporadically.PointyLlama52737 months agoExplorer303Views0likes1CommentHow to change appearance(baseColorTexture) of a preload glb runtime?
Im a beginner in 3D development. I import a glb object into environment.env with predefined textures(baseColorTexture, normalTexture, occlusionTexture), and I try to change the appearance(runtime) when clicking buttons. Here are my code, but It didn't work to change the texture (baseColor or baseColorTexture). Is there anyone could help me? Thank you very much. private fun changeMaterial(node : SceneObject) { val material = node.mesh?.materials?.get(0) var mesh = node.mesh var meshMaterial = node.mesh?.getMaterial(0) as SceneMaterial var test_texture = SceneTexture(activity.getDrawable(R.drawable.test_texture)) //var texture_name = "baseColor" //--> exception: baseColor not found var texture_name = "occlusion" //--> worked and texture is changed meshMaterial.setTexture(texture_name, test_texture) }SolvedBigMac17717 months agoHonored Guest276Views0likes1CommentHow to set alphaMode on custom material?
I only see the alphaMode in the SceneMaterial constructor, but not in the SceneMaterial.custom function? Not is there a settable property for this? I want objects with some of my custom materials to use the TRANSLUCENT_POST option.Solvedwaynecochran7 months agoProtege154Views0likes1Comment
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device