Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/getting-started/android-bringup-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,27 @@ If A passes you can stop. B confirms the CNSDK convention assumptions. C is only

---

## Step 0: Grant runtime permissions (one-time per install)

The test app's `AndroidManifest.xml` declares `android.permission.CAMERA` (CNSDK front-camera face tracking) and `android.permission.WAKE_LOCK` (keep screen on during XR sessions). On Android 6+ `CAMERA` is a "dangerous" permission that requires either a user dialog OR an `adb pm grant`.

The test app is a thin `NativeActivity` with no Java/Kotlin wrapper to surface the runtime permission dialog. Two options for day-1:

```bash
# Option 1: pre-grant via adb (works on emulator + device-with-developer-mode)
adb shell pm grant com.displayxr.cube_handle_vk_android android.permission.CAMERA

# Option 2: tap "Allow" on the system permission dialog the first time
# face tracking tries to open the camera (CNSDK throws the dialog itself
# on first leia_core_enable_face_tracking call — confirm at A1).
```

**Missing CAMERA on Lume Pad symptom:** session reaches FOCUSED, app renders, but `xrLocateViews` always returns the default centered eye position regardless of head motion. No crash, no log error from CNSDK — just silently no face tracking. Check `adb shell dumpsys package com.displayxr.cube_handle_vk_android | grep CAMERA` to confirm grant.

`WAKE_LOCK` is install-time (no dialog needed) and lets the runtime keep the screen on for the session.

---

## Step A: First light (atlas mode)

**Goal:** Verify the entire OpenXR loader → DisplayXR runtime → CNSDK DP → Lume Pad display pipeline runs end-to-end.
Expand Down
29 changes: 29 additions & 0 deletions test_apps/cube_handle_vk_android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,35 @@
android:glEsVersion="0x00030002"
android:required="false" />

<!--
CNSDK's face tracker uses the front-facing camera at runtime
(via libleiaSDK-faceTrackingInApp.so, loaded by the runtime
broker into this app's process). Without these declarations:
- CAMERA permission missing → camera open silently fails →
CNSDK never reports a face → all xrLocateViews calls use
the default centered eye position (no head tracking on
Lume Pad).
- uses-feature camera.front missing → Play Store filters
this app off devices that lack a front camera, AND
Android may not surface camera in the runtime permission
dialog.
Both required="false" so the same APK still installs on the
emulator (no camera hardware) — CNSDK is fine with no face.
-->
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.front" android:required="false" />

<!--
Long XR sessions don't generate user-input events; without
WAKE_LOCK the screen dims/sleeps and the session pauses.
FLAG_KEEP_SCREEN_ON would also work but requires the Activity
to set it programmatically — for a NativeActivity, easier to
request the permission and let the runtime keep the wake
lock for its session duration.
-->
<uses-permission android:name="android.permission.WAKE_LOCK" />

<uses-permission android:name="android.permission.INTERNET" />

<application
Expand Down
Loading