ARCore Android Integration: Tracking, Depth API, Occlusion

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
ARCore Android Integration: Tracking, Depth API, Occlusion
Complex
~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
    744
  • 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

Integrating ARCore into an Android App

ARCore's adaptability across different Android devices is the main challenge in integration. Flagships deliver flawless tracking, while budget models often lose planes due to weak cameras and vibrations. Ignoring this leads to session crashes on real user devices. Our experience shows that every second inquiry is related to this issue.

ARCore works on 400+ Android device models — and that's the main complexity. On a Pixel 7 with a Tensor chip, tracking stays stable. On a budget Redmi with the same ARCore version, planes are not detected due to the weak camera and vibration from cheap OIS. Testing on one device and assuming it works everywhere is a mistake. Our experience: every second inquiry involves an AR session crashing precisely on inexpensive devices due to unaccounted limitations.

Why ARCore Requires Per-Device Compatibility Check

ARCore is not certified for all Android devices. A full list of certified models is maintained by Google in the ARCore supported devices list. Before starting a session, a mandatory check is required:

val availability = ArCoreApk.getInstance().checkAvailability(context)
when (availability) {
    ArCoreApk.Availability.SUPPORTED_INSTALLED -> startArSession()
    ArCoreApk.Availability.SUPPORTED_NOT_INSTALLED -> promptInstall()
    ArCoreApk.Availability.UNSUPPORTED_DEVICE_NOT_CAPABLE -> showFallback()
    else -> { /* SUPPORTED_APK_TOO_OLD, UNKNOWN_ERROR */ }
}

UNSUPPORTED_DEVICE_NOT_CAPABLE — the device will never get support. Show a fallback, do not attempt to install ARCore.

AR Session Architecture

ARCore in Android apps is built around the Session object from com.google.ar.core. Integration with rendering is via GLSurfaceView (old way) or ArSceneView from Sceneform (deprecated by Google, but the fork is maintained). For new projects, we use SceneView — an actively maintained fork of Sceneform with Kotlin coroutines API. To add it, just one line in build.gradle: implementation("io.github.sceneview:arsceneview:2.0.3").

val arSceneView = binding.arSceneView
arSceneView.onSessionCreated = { session ->
    session.configure(
        Config(session).apply {
            planeFindingMode = Config.PlaneFindingMode.HORIZONTAL_AND_VERTICAL
            lightEstimationMode = Config.LightEstimationMode.ENVIRONMENTAL_HDR
            depthMode = Config.DepthMode.AUTOMATIC
        }
    )
}

ENVIRONMENTAL_HDR is a key flag for realistic lighting. ARCore captures an HDR cubic map of the environment and applies it to PBR materials. The object receives shadows and reflections from the real scene.

If you need ARCore integration with guaranteed stability — request a consultation. We will analyze your project and suggest the optimal configuration.

How Depth API Improves Occlusion by 3x

On devices with a depth sensor (ToF camera: Pixel 6 Pro, Samsung S21 Ultra), DepthMode.AUTOMATIC enables a real depth map. On others, ARCore generates depth via ML model from a single camera. Occlusion accuracy on depth sensor is 3x higher than ML-generated, but both give acceptable results. Occlusion by real objects:

arSceneView.onSessionUpdated = { session, frame ->
    if (session.isDepthModeSupported(Config.DepthMode.AUTOMATIC)) {
        val depthImage = frame.acquireDepthImage16Bits()
        // Pass to shader for per-pixel occlusion
        depthImage.close()
    }
}

Don't forget .close()Image objects from ARCore hold native memory; a leak leads to OutOfMemoryError within a minute of active session.

Plane Detection and Hit Test

Placing an object on tap is a standard case:

arSceneView.onGestureListener = object : DefaultARSceneViewGestureListener(arSceneView) {
    override fun onSingleTapConfirmed(e: MotionEvent): Boolean {
        val hitResults = arSceneView.frame?.hitTest(e.x, e.y) ?: return false
        val hitResult = hitResults.firstOrNull { hit ->
            hit.trackable is Plane && (hit.trackable as Plane).isPoseInPolygon(hit.hitPose)
        } ?: return false

        val anchor = hitResult.createAnchor()
        val node = ModelNode(modelFileLocation = "models/chair.glb")
        node.anchor = anchor
        arSceneView.addChild(node)
        return true
    }
}

Checking isPoseInPolygon is important — hitTest might return a point outside the detected plane, causing the object to hang in mid-air.

Augmented Images

AugmentedImageDatabase — for marker-based AR. The database is compiled upfront via arcoreimg eval-img --input_image_path=marker.png (evaluates image quality; Score ≥ 75 for reliable tracking).

val imageDatabase = AugmentedImageDatabase(session)
val bitmap = BitmapFactory.decodeStream(assets.open("marker.png"))
imageDatabase.addImage("product-marker", bitmap, 0.10f) // 10 cm physical size
config.augmentedImageDatabase = imageDatabase

Images with uniform colors or symmetrical patterns yield low score — ARCore cannot find unique feature points. Logos with fine details work better.

Device Type Depth API Occlusion Example Models
Flagship ToF sensor High Pixel 6 Pro, Galaxy S21 Ultra
Mid-range ML generation Medium Samsung A-series, Redmi Note
Budget Not supported None Many Xiaomi Redmi 9

Testing on Real Devices

The ARCore emulator does not provide real tracking. Must test on:

  • Flagship (Pixel, Galaxy S-series) — baseline performance
  • Mid-range (Samsung A-series, Xiaomi Redmi Note) — real user audience
  • Device without depth sensor — check depth API degradation

Firebase Test Lab supports physical devices with ARCore — you can automate basic session launch checks. We have tested on 300+ devices over 7 years of experience — this guarantees stability.

Integration Stage Timeline Complexity
Basic (plane detection) 3–5 days Low
With Depth API 5–8 days Medium
With Augmented Images 5–8 days Medium
Full (depth+lighting) 3–5 weeks High

What's Included

  • Requirements analysis and selection of appropriate API (plane detection, Augmented Images, Depth API)
  • ARCore integration with configuration for target devices
  • Graceful fallback for unsupported devices
  • Testing on 3+ real devices from different segments
  • Delivery of source code and documentation
  • 30-day support after delivery

Timelines

Basic ARCore integration with plane detection and GLB model placement: 3–5 days. Augmented Images with marker database and custom content: 5–8 days. Full solution with depth occlusion, custom lighting, and support for 200+ devices: 3–5 weeks. Cost is calculated individually after requirements analysis.

Additional ARCore Settings For fine-tuning, you can set `Config.updateMode` (BLOCKING or LATEST), `Config.focusMode` (FIXED or AUTO), and other parameters. More details in the SDK.

Evaluate your project — get a consultation. We will select the optimal ARCore configuration for your audience. Guarantee stable AR performance on your users' devices.

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.