Touchpad
Rokid Glasses touchpad gestures come through Android input handling.
For an implementation example and optional phone/emulator touch fallback, see the Rokid Hello World starter.
Camera access
Use CameraX and bind the rear camera. The practical Rokid Glasses capture floor is 1024x768 at 15 fps; request1024x768, not 768x1024, then set target rotation so CameraX applies the correct transform.
Rokid Glasses expose only the rear/outward camera. Configure CameraX at the Application level to expose only CameraSelector.DEFAULT_BACK_CAMERA before any ProcessCameraProvider is initialized. This avoids CameraX front-camera validation retries on hardware that reports no front camera, and still works for Rokid-style phone/emulator testing with a back camera. Omit this only if the same app process needs front-camera features.
AndroidManifest.xml:
Application, implement CameraXConfig.Provider there instead of adding another Application class.
CAMERA permission before binding, and unbind the provider when the camera screen is no longer visible.
Do not rely on Camera2 accepting sub-15 fps requests on Rokid; for lower outbound rates, capture at a supported mode and throttle downstream processing or WebRTC output.
Microphone access
Use the standard Android microphone stack. The Rokid-specific choices areMediaRecorder.AudioSource.MIC and mono capture.
For direct PCM access, use AudioRecord:
AudioRecord.read(...) on a background thread with Process.THREAD_PRIORITY_AUDIO, then stop and release the recorder when capture ends.
For WebRTC or another streaming stack that owns capture, configure that stack to use the same Rokid-friendly microphone path:
USAGE_MEDIA instead of a voice-call route and disable hardware AEC/noise suppression to avoid the vendor VOIP path. Request normal Android RECORD_AUDIO permission before starting either path.