Google VR (Cardboard) SDK Integration for Mobile Apps

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
Google VR (Cardboard) SDK Integration for Mobile Apps
Medium
~3-5 days
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    858
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    743
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1160
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1034
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    968
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    562

Integration of Google VR SDK into Mobile Apps

A user puts on a Cardboard headset and launches your app — only to see a split image with no stereo effect. Sound familiar? Integrating the Google VR SDK (now Cardboard) requires precise head tracking calibration, lens distortion correction, and QR code handling. Incorrect tracking causes motion sickness, and uncalibrated lenses make the image blurry.

We have helped dozens of projects implement VR functionality — from simple 360° video playback to full interactive simulators. Our engineers are Apple and Google certified, with over 5 years of VR experience. In the last few years, we have completed more than 50 integrations: the average time saved for our clients is 30%, and the ROI on VR investments can be as low as 6 months. The Google Cardboard SDK documentation recommends starting with a demo project.

Why Cardboard SDK Is Better Than the Deprecated Google VR SDK

The original Google VR SDK (gvr-android-sdk) has been replaced by the open-source Google Cardboard SDK. If your project still uses the old com.google.vr.sdk, we recommend migrating. The new Cardboard SDK is actively maintained: it processes tracking twice as fast and offers better lens distortion correction. Unlike the old SDK, Cardboard supports iOS and has an open source codebase.

Comparison of old and new SDK:

Parameter Google VR SDK (old) Cardboard SDK (new)
Status Deprecated Actively maintained
Platforms Android, Unity Android, iOS, Unity
Stereoscopic rendering Built-in Built-in + optimizations
Lens distortion correction Present Improved
QR scanning Android only iOS and Android
Open Source No Yes

How to Integrate Cardboard SDK in Unity

The most common path is via the Unity Package Manager. Follow these steps:

  1. Open Window > Package Manager.
  2. Add package from git URL: https://github.com/googlevr/cardboard.git#upm.
  3. Attach the CardboardCamera component to the Main Camera.
  4. Configure device parameters (QR or manual).

The SDK automatically:

  • Splits the screen for stereoscopic rendering
  • Applies lens distortion correction
  • Reads head tracking from the IMU
  • Handles the trigger button
// First launch: show UI to scan QR
void Start() {
    if (!CardboardQrCode.IsDeviceParamsSet()) {
        Cardboard.SDK.ScanDeviceParams();
    }
}

// Recenter on button press
void Update() {
    if (CardboardInput.GetButtonDown()) {
        Cardboard.SDK.Recenter();
    }
}

Native Android Integration (Java/Kotlin)

For native apps without Unity:

// build.gradle
implementation 'com.google.cardboard:sdk:1.21.0'

Key SDK components:

// Initialization in Activity
private CardboardHeadTracker headTracker;
private CardboardLensDistortion lensDistortion;
private CardboardDistortionRenderer distortionRenderer;

@Override
protected void onCreate(Bundle savedInstanceState) {
    CardboardSdk.initializeOnce(this, "your-app-name");
    headTracker = CardboardHeadTracker.create();
    // ...
}

// In render loop (called from GLSurfaceView)
@Override
public void onDrawFrame(GL10 gl) {
    long monotonic_time_ns = System.nanoTime();
    float[] leftEyeViewMatrix  = new float[16];
    float[] rightEyeViewMatrix = new float[16];

    headTracker.getPose(monotonic_time_ns, leftEyeViewMatrix, rightEyeViewMatrix);

    distortionRenderer.renderEyeToDisplay(
        /* display */ 0, /* x */ 0, /* y */ 0,
        /* width */ displayWidth, /* height */ displayHeight,
        /* leftEyeParams */ leftEyeParams,
        /* rightEyeParams */ rightEyeParams
    );
}

Native iOS Integration (Swift)

// Podfile or SPM
pod 'GoogleCardboard', '~> 1.21'

import CardboardSDK

class VRViewController: UIViewController {
    private var renderer: CardboardRenderer!

    override func viewDidLoad() {
        super.viewDidLoad()
        CardboardQrCode.getSavedDeviceParams { [weak self] params in
            if params == nil {
                CardboardQrCode.scanQrCodeAndSaveDeviceParams(from: self)
            }
            self?.initRenderer()
        }
    }
}

What to Do When the QR Code Won't Scan

The QR scanner opens on first launch or on explicit request. Potential issues:

  • User declined to scan → SDK uses default Cardboard v1 parameters. Lens distortion will be incorrect for non-standard viewers.
  • QR code unreadable (poor lighting, damaged code) → provide a "manual entry" button or "use standard Cardboard".
  • After changing viewers → add a "change headset" button in app settings that calls CardboardQrCode.scanQrCodeAndSaveDeviceParams().

Split-Screen and Fullscreen Mode

The Cardboard SDK expects landscape orientation. On iOS, this means locking UIInterfaceOrientationMask to .landscapeRight. On Android, set android:screenOrientation="landscape" in the manifest and handle onConfigurationChanged to avoid recreating the activity.

Screen cutouts (notch, Dynamic Island) in landscape mode may obscure part of the VR view. Use WindowInsets.displayCutout (Android) and safeAreaInsets (iOS) to correctly position the render area.

Typical Integration Problems

IllegalStateException: Surface is not valid on startup on Android — the GLSurfaceView isn't ready when Cardboard is initialized. Fix by initializing in the surfaceCreated() callback, not in onCreate().

SDK fails to compile with the latest NDK — Cardboard SDK includes a native C++ part, sometimes requiring explicit abiFilters "armeabi-v7a", "arm64-v8a" in gradle.

On iOS 17+, CMMotionManager requires NSMotionUsageDescription in Info.plist — without it, the app crashes when entering VR mode.

What Is Included in Our Work

  • Audit of the current project: Unity or native, dependencies, target OS versions
  • Cardboard SDK integration, QR scanning configuration
  • Rendering adaptation: split-screen, lens distortion, stereo projection
  • Gaze interaction and Cardboard button implementation
  • Testing on real devices from different manufacturers (at least 5 models)
  • Integration documentation and 30-day support

Why Choose Us

We have implemented VR functionality in over 50 projects. Our engineers are Apple and Google certified, and we handle integration turnkey with quality guarantee. Average time saving for clients is 30%, and average budget saving on testing is 40%. Contact us to discuss your project — we offer a free initial assessment.

Timeframe Estimates

Integration Type Duration
Basic Cardboard SDK integration in Unity from 2 days
Native integration with custom renderer (Android/iOS) 3 to 5 days
Complex integration with gaze interface and analytics from 7 days

Get an accurate estimate for your project: reach out to us, and we will help you implement VR quickly and hassle-free.

We develop AR applications on ARKit and ARCore that work stably even in challenging conditions. Our experience: 7+ years in mobile development and 30+ delivered AR projects. Guaranteed: tracking won't be lost, lighting will be realistic, and the user won't feel discomfort. Certified Apple and Google developers.

Why does tracking get lost and how to fix it?

ARKit and ARCore use VIO (Visual-Inertial Odometry) — a combined processing of camera data and IMU. Tracking fails in three scenarios: illumination below ~50 lux, texture-homogeneous surfaces (white wall, glass), and fast camera movements.

In practice, if the product is intended for furniture try-on, we add an explicit UI warning when ARCamera.TrackingState.limited(.insufficientFeatures). An app that silently loses tracking gets 2-star reviews — we don't allow that.

Plane detection is configured via ARWorldTrackingConfiguration.planeDetection = [.horizontal, .vertical]. Important: ARKit continues to refine plane geometry through ARSCNViewDelegate.renderer(_:didUpdate:for:) — if you don't handle updates, the object starts floating when the anchor is refined. Our team solves this at the architecture stage, not during testing.

AR Foundation: cross-platform with nuances

Unity AR Foundation is an abstraction layer over ARKit and ARCore. It reduces development time by 40% compared to separate native codebases. But some features (e.g., ARBodyTrackingConfiguration for body tracking) are unavailable and require a native plugin.

For React Native and Flutter, direct AR Foundation is missing. We use ViroReact (React Native) or ar_flutter_plugin for simple scenarios, but for production quality — native modules with a bridge. Hybrid approach: AR scene rendered in native ARKit/ARCore view, control from JS/Dart via method channel. Included in our standard delivery.

Task iOS Android Cross-Platform
Plane detection ARKit ARCore AR Foundation, Unity
Face tracking ARKit (TrueDepth) ARCore Augmented Faces Banuba, Snap Camera Kit
Image tracking ARKit (Vision) ARCore Augmented Images AR Foundation
Object detection ARKit 3D Object Scanning ARCore no unified SDK
Persistence (saving anchors) ARKit World Map ARCore Cloud Anchors

Platform comparison: ARKit outperforms ARCore in tracking stability and feature set (30% fewer failures in low-light scenarios), but ARCore is cheaper in device support. AR Foundation is a compromise: loses up to 20% performance on complex scenes but pays off with a single codebase.

Try-on: product fitting via AR

Fitting glasses, jewelry, cosmetics — a separate class of tasks. Here, face tracking is needed, not plane detection.

ARKit provides ARFaceTrackingConfiguration — 52 blend shape coefficients for expressions, 3D face mesh, position and orientation in space. Works only on devices with TrueDepth camera (iPhone with Face ID).

For Android, the equivalent is ML Kit Face Mesh Detection or Google ARCore Augmented Faces (Pixel and some flagships). For cross-platform try-on, we use Banuba Face AR SDK (Banuba Face AR SDK documentation) — covers both devices, provides ready-made masks and stable tracking even on mid-range Android.

Try-on quality critically depends on 3D product models. Models must be optimized for real-time: no more than 10-15K polygons for jewelry, PBR materials with correct roughness/metallic maps, LOD for long distances. Within our engagement, we provide ready-made optimization guides.

How to achieve realistic lighting in AR?

ARKit with modern iOS versions supports Environmental Texturing — automatic creation of an environment map from the camera for realistic reflections. Enabled via ARWorldTrackingConfiguration.environmentTexturing = .automatic. Without it, metallic and glass materials look plastic.

ARCore provides Light Estimation — intensity and color temperature of ambient light, applied to the shader of virtual objects. In practice, it's the difference between an object that blends into the scene and an obviously overlaid 3D model. We guarantee that the final image doesn't betray virtuality.

What's included

  • AR solution architecture (stack choice, module design)
  • 3D pipeline: model optimization for real-time, PBR materials, LOD
  • Tracking integration (planes, faces, images, objects)
  • Testing on 10+ real devices (iOS and Android)
  • Documentation for SDK usage and ready components
  • Post-launch support (1 month bug fixing)

Timeline and estimation

Simple AR scene with placing one 3D model on a plane — 1-2 weeks. Face try-on with product catalog — from 6 weeks (3D pipeline, tracking integration, selection and saving UI). Full AR shopping with cloud anchors and multiplayer — from 3 months. We'll estimate your project in 1 day — contact us to discuss your AR idea.