Skip to content

Get Started

The Cognitive3D SDK for Android adds analytics to any native Android app, including apps for phones, tablets, and head-worn devices without an XR runtime. It records sessions, custom events, sensors, and device health, so you can see how participants use your app on any Android device.

This SDK provides baseline support that runs on any Android device. For immersive XR apps, use the Android XR or Meta Spatial SDK instead. All three share the same Cognitive3DManager API, so custom events, sensors, and session properties work the same way.

Supported devices

The SDK runs on Android 10 (API level 29) or later, including:

  • Phones and tablets.
  • Head-worn devices with a 2D display and no XR runtime.
  • 2D apps running in a window on an XR headset, such as Samsung Galaxy XR or Meta Quest.

Choose the right SDK

Use this table to choose between the Android SDKs:

Your app SDK Maven artifact
Phone, tablet, or 2D app on any Android device Android com.cognitive3d:android-sdk
Immersive app built with Jetpack XR Android XR com.cognitive3d:android-xr-sdk
Immersive app built with the Meta Spatial SDK Meta Spatial com.cognitive3d:meta-spatial-sdk

Prerequisites

  • An Android app with a minimum SDK of 29.
  • Kotlin 1.9+ or Java 11+.
  • A Cognitive3D account and application API key. Sign up for free.

What the SDK records automatically

Once installed, the SDK records the following without any additional code:

  • Session start, pause, resume, and end. A session covers the whole app, not a single screen, so moving between activities doesn't split it.
  • Device orientation (3DoF) from the device's rotation sensor.
  • Frame rate, battery, thermal state, memory, and Wi-Fi signal as default sensors.
  • Device, OS, and app details as session properties.
  • Crashes and the reason the previous session ended, when Android reports one.

Feature support

Feature support differs from the XR SDKs because this SDK doesn't use an XR runtime:

Feature Android Android XR and Meta Spatial
Sessions, custom events, sensors, and session properties Yes Yes
Device health sensors and crash reporting Yes Yes
Head orientation 3DoF, from the rotation sensor 6DoF, from the XR runtime
Head position No Yes
Gaze Direction the device faces Head or eye tracking
Controllers and hands No Yes
Eye tracking No Android XR only
Dynamic Objects No Yes

Orientation and gaze

The SDK reads orientation from the device's rotation sensor. Orientation has no position, so the participant always appears at the origin in Session Replay.

Gaze is the direction the device faces:

  • On a head-worn device, this approximates where the participant is looking.
  • On a phone or tablet, this is where the device points, not where the participant looks on the screen.

The rotation sensor has no fixed compass heading. The SDK treats the direction the device faces when recording starts as forward, and resets it each time the app returns to the foreground.

In this guide

intercom If you have a question or any feedback about our documentation please use the Intercom button (purple circle) in the lower right corner of any web page or join our Discord.