> For the complete documentation index, see [llms.txt](https://rayneo-en.gitbook.io/rayneo-devdoc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rayneo-en.gitbook.io/rayneo-devdoc/x-series/android-sdk.md).

# Android SDK

This guide explains how to build a production‑ready Android app for the **RayNeo X-Series Glasses** using standard Android tooling.

You’ll learn:

* What’s different from developing a regular phone app
* The platform‑specific limitations you need to keep in mind
* How to integrate the RayNeo AR SDK to address those differences

## Overview

**X-Series Glasses** is a pair of AR glasses running a full Android 12 stack. Compared with a phone, you’ll run into two key architectural differences:

### Dual Displays

A phone has one screen, the X3 has two:

* the left panel projects to the left eye and the right to the right eye. Android still gives you one “logical screen,” which means a vanilla phone UI will tear in half—left eye shows the left half, right eye shows the right half, and the two overlap.
* To fix binocular fusion, you must render each piece of UI twice—once per eye. The RayNeo AR SDK ships drop‑in base components (View, Activity, Dialog, Toast, etc.) that handle this automatically so you don’t have to copy‑paste boilerplate.

### Input & Focus

A phone’s touch events are fully 2‑D (X and Y). The X3 exposes 2‑D coordinates as well, but you still need an explicit focus system. If you already have an X2 app, you can migrate it simply by upgrading to the new SDK.

Useful links:

* [Device Introduction](/rayneo-devdoc/x-series/device-introduction.md)
* [ARDK Download](/rayneo-devdoc/x-series/android-sdk/ardk-download.md)
* [Quick Start](/rayneo-devdoc/x-series/android-sdk/quick-start.md)
* [Capabilities & API](/rayneo-devdoc/x-series/android-sdk/capabilities-and-api.md)
* [IPCSDK for Android](/rayneo-devdoc/x-series/android-sdk/ipcsdk-for-android.md)
* [ADB](/rayneo-devdoc/faq/adb-debug.md)

## Feature Matrix

<table data-header-hidden><thead><tr><th width="161"></th><th></th><th></th><th></th></tr></thead><tbody><tr><td></td><td><strong>Function Point</strong></td><td><strong>Description</strong></td><td><strong>Core Components</strong></td></tr><tr><td><strong>Binocular Display</strong></td><td>Sight Merging Component</td><td>Implements mirroring effect for left-right dual-screen layout to reduce duplicate code.</td><td>BindingPair</td></tr><tr><td></td><td>Activity-Level Sight Merging</td><td>Automatically mirrors layout views, allowing developers to focus on business UI.</td><td>BaseMirrorActivity</td></tr><tr><td></td><td>Fragment-Level Sight Merging</td><td>Sight merging encapsulation at the Fragment level, requiring independent use (cannot be added to BaseMirrorActivity).</td><td>BaseMirrorFragment</td></tr><tr><td></td><td>View-Level Sight Merging</td><td>Sight merging views based on composition (MirrorContainerView) and inheritance (BaseMirrorContainerView).</td><td>MirrorContainerView, BaseMirrorContainerView</td></tr><tr><td></td><td>Toast Sight Merging</td><td>Encapsulation of universal Toast supporting sight merging.</td><td>FToast</td></tr><tr><td></td><td>Dialog Sight Merging</td><td>Encapsulation of universal Dialog supporting sight merging.</td><td>FDialog</td></tr><tr><td></td><td>updateView Method</td><td>Updates components in both left and right layouts simultaneously to avoid duplicate code.</td><td>BindingPair.updateView</td></tr><tr><td></td><td>setLeft Method</td><td>Operates only on the left layout, suitable for event binding or external data modification.</td><td>BindingPair.setLeft</td></tr><tr><td><strong>Focus Management</strong></td><td>Focus Tracking Basic Implementation</td><td>Maintains focus switching logic, supporting gestures (swipe forward/backward) and event responses (single-tap/double-tap).</td><td>FocusHolder, FixPosFocusTracker</td></tr><tr><td></td><td>RecyclerView Focus Management</td><td>Supports focus switching in list scenarios, with two modes: fixed focus position and moving focus position.</td><td>RecyclerViewSlidingTracker, RecyclerViewFocusTracker</td></tr><tr><td></td><td>Custom View Focus Interface</td><td>Enables custom views to implement focus switching logic.</td><td>IFocusable interface</td></tr><tr><td><strong>Touch Events &#x26; Responses</strong></td><td>Gesture Recognition &#x26; Distribution</td><td>Converts raw MotionEvent into gestures such as single-tap, long-press, and swipe, and exposes them through event streams.</td><td>TouchDispatcher, CommonTouchCallback</td></tr><tr><td></td><td>Event Stream Encapsulation</td><td>Maps gestures to TempleAction subclasses, supporting Kotlin Flow responses.</td><td>BaseEventActivity, TempleAction</td></tr><tr><td></td><td>Rayneo X3 New Gestures</td><td>Supports gestures like swipe up/down and two-finger tap, optimizing swipe direction recognition.</td><td>CommonTouchCallback interface</td></tr><tr><td></td><td>Swipe Direction Mapping</td><td>Supports touchpad swipe mapping in natural and non-natural modes, switchable in system settings.</td><td>TempleAction.SlideForward/Backward</td></tr><tr><td><strong>Smooth Scrolling</strong></td><td>Fixed Focus Position List Follow-Up</td><td>Modifies raw event coordinates to achieve list scrolling follow-up effect.</td><td>RecyclerViewSlidingTracker</td></tr><tr><td></td><td>Moving Focus Position List Follow-Up</td><td>Triggers focus switching based on swipe distance, combined with list scrolling.</td><td>RecyclerViewFocusTracker</td></tr><tr><td></td><td>Fixed View Follow-Up Effect</td><td>Follow-up swipe response for fixed-position views.</td><td>FixPosFocusTracker</td></tr><tr><td><strong>3D Effect Implementation</strong></td><td>Binocular Parallax Pseudo 3D</td><td>Creates parallax through left-right view offset to form a 3D effect.</td><td>make3DEffect, make3DEffectForSide</td></tr><tr><td><strong>Audio Capture Modes</strong></td><td>X2 Sound Collection Mode</td><td>Supports modes like recording, camera sound collection, translation, and voice assistant, requiring parameter settings via AudioManager.</td><td>AudioManager.setParameters</td></tr><tr><td></td><td>X3 Sound Collection Mode</td><td>New specific sound collection modes (not detailed in documentation, refer to specific implementations).</td><td>-</td></tr><tr><td><strong>Camera Development</strong></td><td>Camera Function Call</td><td>Based on Android camera2 API, supporting resolution enumeration and preview.</td><td>CameraManager, Camera2 API</td></tr><tr><td><strong>Mobile Connection &#x26; GPS Streaming</strong></td><td>Mobile Connection Status Monitoring</td><td>Obtains real-time Bluetooth connection status of the mobile phone.</td><td>MobileState.isMobileConnected()</td></tr><tr><td></td><td>GPS Data Streaming</td><td>Integrates IPC SDK to obtain mobile phone GPS data, requiring asynchronous callback handling.</td><td>IPC SDK, OnResponseListener</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://rayneo-en.gitbook.io/rayneo-devdoc/x-series/android-sdk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
