AR Camera
This documentation will provide the complete details for inplementing AR camera
Prerequisites
Ensure you have included the necessary Truvideo SDK dependencies in your project.
Steps to Implement AR Camera Call
Initial Project Setup
import { initARCameraScreen, CameraMode, Orientation } from '@trunpm/truvideo-react-turbo-camera-sdk';
AR Camera Configuration
Define the AR camera configuration in your React component. For example, to capture images in portrait mode:
var arConfig : ARCameraConfiguration = {
outputPath: "",
orientation: Orientation.Portrait,
mode: CameraMode.image(),
}
Calling the Camera
Inside your React component, add a button to trigger the AR camera
import { Button, View } from 'react-native';
export default function App() {
const openARCamera = () => {
initARCameraScreen(arConfig)
.then((response) => {
console.log("AR response:", response);
})
.catch((err) => {
console.log("AR error:", err);
});
};
return (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<Button title="Open AR Camera" onPress={openARCamera} />
</View>
);
}
AR Mode states
Inside the ARCamera module, we have 3 AR Mode States: Object (arrow), Ruler and Record. By default we will have an AR Cursor and the AR Mode RULER.
OBJECT: Allows the user to add a 3D Object on the AR Cursor, in this case an arrow.
RULER: Allows the user to meter with our AR Ruler a determined 3D space.
RECORD: Hiddens the AR Cursor so we can focus on the media recording.

AR Camera Validations ( Android Specific ) :
Inside the ARCamera module, we validate whether the device supports or has ARCore installed, in those case scenarios, we have 2 values that can return that information:
isAugmentedRealitySupported
: This property determines whether the device's hardware supports ARCore. It is essential to validate this before attempting any augmented reality operations, as trying to use ARCore on an unsupported device will result in runtime errors or unexpected behavior.isAugmentedRealityInstalled
: This property checks whether the ARCore services are installed on the device. Even if the device supports ARCore, it may not have the required services installed. By verifying this property, developers can avoid runtime issues by prompting users to install ARCore if necessary.
const isAugInstalled = isAugmentedRealityInstalled();
const isAugmentSupported = isAugmentedRealitySupported();
Final Result

AR Camera Limitations ( Android Specific ) :
During the development of AR experiences using ARCore, it's common to require control over the camera resolution — for high-quality recordings, image processing, or performance (low resolution videos with 720p). However, ARCore restricts direct control over the camera resolution during an AR session, which can lead to confusion or misaligned expectations among developers. ARCore internally does not allow the user to change the camera session if it's too low for ARCore (minimum currently on our tests was 1080p) or if the device itself does not allow it.
📚 Official References and Sources about limitations
ARCore CameraConfig Documentation Describes camera configuration options and limitations:
GitHub Issues in ARCore SDK The ARCore team has clarified that resolution control is not supported due to architectural constraints:
AR Camera Recommendations
Do not assume Camera2-like behavior when working with ARCore’s camera stream.
Avoid restarting the AR session solely to apply a different resolution — this often leads to crashes or resource leaks.
Always validate the selected
CameraConfig
, but understand that ARCore may internally override it to ensure tracking quality.
Last updated
Was this helpful?