android(test app): declare CAMERA + WAKE_LOCK permissions for Lume Pad#350
Open
leaiss wants to merge 1 commit into
Open
android(test app): declare CAMERA + WAKE_LOCK permissions for Lume Pad#350leaiss wants to merge 1 commit into
leaiss wants to merge 1 commit into
Conversation
4 tasks
CNSDK's face tracker (libleiaSDK-faceTrackingInApp.so, loaded by the
broker into the test app's process) needs the front-facing camera at
runtime. Without `android.permission.CAMERA` in the manifest:
- The system camera service silently refuses the open() call.
- CNSDK never reports a detected face.
- xrLocateViews falls back to the default centered eye position.
- **No crash, no log error** — just silently no head tracking on
Lume Pad. Hours of "why isn't head tracking working" debugging
saved by declaring this up front.
Adds:
- uses-permission CAMERA + WAKE_LOCK
- uses-feature camera + camera.front (required=false so the same APK
still installs on the emulator which has no camera HW)
CAMERA is "dangerous" on Android 6+ — declared in the manifest, but
the user must also grant it at runtime. Test app is a pure
NativeActivity with no Java wrapper to surface the system dialog. Two
day-1 workarounds documented in android-bringup-checklist.md Step 0:
1. `adb shell pm grant com.displayxr.cube_handle_vk_android \
android.permission.CAMERA` (pre-grant via developer mode)
2. Wait for CNSDK to throw the system dialog at first
leia_core_enable_face_tracking (untested — depends on CNSDK
behavior on Lume Pad).
Production-quality permission handling (wrap NativeActivity in a
Kotlin Activity that requests permission at onCreate) deferred to
follow-up.
WAKE_LOCK is install-time and lets the runtime keep the screen on
during long XR sessions without user input.
Verified on emulator: install/launch unchanged, xrCreateInstance
still reaches XR_SUCCESS, declared permissions visible via
`adb shell dumpsys package`.
1905509 to
6bc7b5b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pre-Lume-Pad audit of the test app's
AndroidManifest.xml. Adds two missing permissions that would otherwise silently degrade the day-1 experience, plus a Step 0 inandroid-bringup-checklist.mddocumenting how to grant them.What this fixes (silent failures avoided)
android.permission.CAMERAlibleiaSDK-faceTrackingInApp.soopens the front camera atleia_core_enable_face_tracking. Without CAMERA: silent open() failure, no face reported,xrLocateViewsalways returns default centered eye position. No crash, no log error — just no head tracking. Hours of "why isn't head tracking working" debugging.pm grantdocumenteduses-feature camera.frontrequired="false"so emulator (no camera) still installsandroid.permission.WAKE_LOCKNotes on CAMERA runtime grant
CAMERA is "dangerous" on Android 6+; declaring it in the manifest isn't enough — the user must grant at runtime. The test app is a pure
NativeActivitywith no Java/Kotlin wrapper to surface the system dialog. Two workarounds documented in the bring-up checklist:leia_core_enable_face_tracking— depends on CNSDK behavior on Lume Pad, untested pre-hardware.Production-quality permission handling (wrap
NativeActivityin a KotlinActivitythat callsrequestPermissions()atonCreate) deferred — that's a separate ~50 LOC change with its own review concerns.Verification
Built + installed on the Android-36 emulator:
Install/launch unchanged.
xrCreateInstance -> XR_SUCCESSstill reaches the runtime as before.Test plan
dumpsys package | grep CAMERAshowsgranted=truebefore launching the app.pm grantis run, document the timing in the bring-up doc for future installs.🤖 Generated with Claude Code