Google Unifies Android Development for XR, Enabling Camera Access
Google is doing the right thing by bringing all of the Android development features from phones to Android XR, and one big question developers had was about using the pass-through cameras on Android XR headsets. It appears they are, based on an recent email exchange that a VR developer, Skarred Ghost had with a Google spokesperson, confirming that Android XR developers will have access to camera functionalities. The spokesperson clarified that developers can utilize existing camera frames with user permission, similar to any other Android app. Specifically, developers can request access to the world-facing (rear) camera stream using camera_id=0
and the selfie-camera (front) stream using camera_id=1
through standard Android Camera APIs (Camera2 and CameraX). Access to the world-facing camera requires standard camera permissions, just like on phones. For the selfie-camera, developers receive an image stream of the user’s avatar, generated by avatar provider apps/services based on user tracking data from inward-facing cameras. The spokesperson emphasized that Android developers can use the same camera management classes (like CameraX) on Android XR headsets as they do on phones, enabling functionalities like grabbing frames and videos, saving media, and running machine learning analysis.
This shows that Google and the Android team have not only learned from their time and experience with Android handsets, TVs, and wearables, but they have also created an ecosystem of developable tools that will allow developers to create one app for all platforms instead of separate apps for each platform. This is a significant advantage, creating a great experience for developers across many different platforms, especially when they utilize Jetpack libraries for a cohesive UI experience across Android hardware.
This move by Google signals a bright future for Android XR development. The unification of the platform, coupled with camera access, empowers developers and paves the way for a new generation of immersive experiences.
