# Glass3 SDK Overview

Glass3 SDK is a terminal development kit for **Rokid Glass3 AI glasses** and **Android phone apps**. It helps developers build two-device experiences that involve device connectivity, messaging, remote control, media capture, speech interaction, and AI capability integration.

If your application needs the phone and glasses to work together, this SDK provides the device connection layer, data channels, and common capability APIs needed to get started quickly.

## Use cases

Glass3 SDK is suitable for applications such as:

| Scenario | Description |
| --- | --- |
| Phone controls glasses | Scan, connect, and manage glasses from the phone; remotely trigger photo capture, video recording, or live preview. |
| Two-way transfer | Send text, files, images, videos, and business commands between the phone and glasses. |
| Standalone glasses app | Build Android apps on the glasses and call camera, speech, recognition, and messaging capabilities. |
| AI and speech interaction | Build speech experiences with ASR, TTS, AI Chat, and offline voice commands. |
| Vision recognition | Integrate face detection, license plate recognition, and related vision capabilities. |

## Two-side architecture

Glass3 SDK has phone-side and glasses-side components:

| Side | Responsibility |
| --- | --- |
| Phone SDK | Scans and connects to glasses, establishes Bluetooth/P2P channels, forwards network requests, sends and receives messages/files, and controls glasses capabilities. |
| Glasses SDK | Registers the glasses app, receives phone-side commands, calls glasses hardware/system capabilities, and returns results. |

Typical flow:

```text
Phone app
  ↓ Bluetooth scan / pairing
Glass3 glasses
  ↓ Establish P2P channel
Phone app ⇄ Glasses app
  ↓
Messages, files, AV streams, remote control, AI/speech capabilities
```

## Core capabilities

### Device connectivity

- Bluetooth scan, pairing, and connection
- Wi-Fi P2P direct connection
- Device state synchronization
- Remote control and connection state monitoring

### Messaging and file transfer

- Phone sends messages and files to glasses
- Glasses send messages and files to phone
- Notification sync
- Live video preview data transfer

### Media

- Photo capture on glasses
- Video recording on glasses
- Audio recording and AV stream capture
- Phone-side album preview and media sync

### Speech and AI

- ASR speech-to-text
- TTS text-to-speech
- Offline voice commands
- AI Chat integration

Online ASR/TTS usually requires AK/SK credentials. For private speech deployment, see [ASR/TTS Private Deployment SDK](/en/private-speech/SDK_INTEGRATION.md).

### Vision recognition

- Face detection
- License plate recognition
- Cloud and on-device recognition combinations

## Recommended integration path

If this is your first integration, follow this order:

1. Start with [Quick Start](./快速开始.md) to prepare the environment and configure the Maven repository and SDK dependencies.
2. To run the official Demo, open the [Demo running guide](/en/downloads/demo-guide.md) to get, build, run, and validate the Demo.
3. Read [Code samples](/en/代码示例/) by capability: connectivity, messaging, media, speech and AI, vision, and system settings.
4. During development, use [Phone SDK API](/en/terminal-sdk/api-reference/Glass3%20%20SDK(%E6%89%8B%E6%9C%BA%E7%AB%AF)%20API%E6%96%87%E6%A1%A3.md) and [Glasses SDK API](/en/terminal-sdk/api-reference/Glass3%20%20SDK(%E7%9C%BC%E9%95%9C%E7%AB%AF)%20API%E6%96%87%E6%A1%A3.md).
5. For connection, Bluetooth, P2P, or permission issues, check [FAQ](/en/faq/常见问题.md).

## Demo project

The Demo project includes both phone and glasses apps and shows the complete SDK call flow.

| Demo | Main capabilities |
| --- | --- |
| Phone Demo | Bluetooth scan and connection, Wi-Fi P2P, message/file transfer, notification sync, and glasses-side AV preview. |
| Glasses Demo | SDK initialization, messaging, photo/video capture, offline voice commands, ASR/TTS, AI Chat, face detection, and license plate recognition. |

Demo project:

[https://gitee.com/as_pixar/glass3sdkdemo](https://gitee.com/as_pixar/glass3sdkdemo)

For concrete download, build, and run steps, see the [Demo running guide](/en/downloads/demo-guide.md). To watch the flow first, see the [Build an app in five minutes](./视频教程.md#_1-build-an-app-in-five-minutes) video.

## P2P communication

P2P is the point-to-point channel between the phone and glasses. It is suitable for low-latency transfer scenarios such as messages, files, live AV streams, and remote control.

Establishing P2P usually includes:

1. The phone obtains required Bluetooth and Wi-Fi permissions.
2. The phone discovers and connects to the glasses through Bluetooth.
3. Both sides negotiate and establish the P2P channel.
4. Messages, files, or AV data are transferred through the P2P channel.

After P2P is established, the glasses do not access the internet directly. The typical network path is:

```text
Glasses → P2P → Phone → Cellular or Wi-Fi → Business server
```

Responses return through the reverse path:

```text
Business server → Phone → P2P → Glasses
```

Therefore, if your business needs public internet access, the phone usually handles network forwarding, authentication, and data relay.

## Before you start

Before development, make sure:

- Android development environment is ready.
- Android Studio uses JDK 17 or later.
- Both phone and glasses Demo projects can be built successfully.
- Required permissions are prepared for the target capabilities, such as Bluetooth, Wi-Fi, audio recording, camera, and storage.
- If online speech, AI, or private speech services are needed, AK/SK, service domain, and API paths are ready.

## Next steps

- To run the project quickly: read [Quick Start](./快速开始.md).
- To integrate by capability: read [Code samples](/en/代码示例/).
- To look up APIs: read [API reference](/en/terminal-sdk/api-reference/Glass3%20%20SDK(%E7%9C%BC%E9%95%9C%E7%AB%AF)%20API%E6%96%87%E6%A1%A3.md).
- To integrate QR scanning: read [QR Scan SDK](/en/scan/扫一扫SDK.md).
- To integrate private ASR/TTS: read [ASR/TTS Private Deployment SDK](/en/private-speech/SDK_INTEGRATION.md).
