> For the complete documentation index, see [llms.txt](https://docs.multiset.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.multiset.ai/native-sdk/android-native/sample-activities.md).

# Sample Activities

The sample activities shipped with the Android SDK, with a comparison of the localization modes, object tracking, map scanning and the XREAL Aura sample.

This section provides detailed documentation for the sample activities included in the MultiSet Android SDK. These activities demonstrate how to implement VPS localization, object tracking and map scanning in your Android application.

## Available Activities

### [MainActivity](/native-sdk/android-native/sample-activities/mainactivity.md)

The entry point for the SDK demo application. Handles SDK initialization, authentication, and navigation to the AR activities. Displays a card-based UI with a Localization card (mode picker and Start button), an Object Tracking card and a Mapping card.

### [MultiSetLocalizationActivity](/native-sdk/android-native/sample-activities/multisetlocalizationactivity.md)

Unified AR localization activity that supports both single-frame and multi-frame localization modes. The mode is selected at launch time via an intent extra, and defaults to single frame.

### [ObjectTrackingActivity](/native-sdk/android-native/sample-activities/objecttrackingactivity.md)

Dedicated AR activity for detecting and tracking pre-registered physical objects. Once an object is tracked, its 3D mesh is fetched from the MultiSet platform and rendered on that object's own anchor with an animated glowing outline.

### [Map scanning screens](/native-sdk/android-native/api-reference/map-scanning.md#sample-app-screens)

"Before you scan" instructions, a landscape scan screen and a Draft Maps screen, built on `MultiSetSDK.mapping`.

***

## Shared Run UI

Both AR activities show each run the same way, driven by the sessions' [run stages](/native-sdk/android-native/api-reference/framesource.md#run-stages):

* **A run you start** (a tap, the first fix and its silent retries) covers the scene: a capture overlay with a frame count, then a server-wait overlay. Close and the status card stay reachable over it.
* **Every run**, background ones included, shows on a round status card at the top left: a camera flash per frame, an arc while the query goes out, a spinner while the server searches, then a tick or a red mark.
* **A return from the background** hides the map mesh and gizmo, or the object outlines, until the SDK has re-localized or re-tracked once tracking is back.
* **While a mesh downloads**, a loading strip takes the mesh toggle's place at the bottom left.

***

## Localization Mode Comparison

| Feature         | Single-Frame (default) | Multi-Frame         |
| --------------- | ---------------------- | ------------------- |
| Frames captured | 1                      | 4–6 (configurable)  |
| Accuracy        | Good                   | Better              |
| Capture time    | Instant                | \~2–3 seconds       |
| Network usage   | Lower                  | Higher              |
| Query mode      | VPS-1 or VPS-2         | VPS-1 or VPS-2      |
| Best for        | Quick localization     | Precise positioning |

***

## Object Tracking at a Glance

| Feature              | Description                                                                                                      |
| -------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Supported objects    | Up to 10 simultaneously, each on its own anchor                                                                  |
| Mesh rendering       | GLB fetched from platform, outline-only animated shader                                                          |
| Auto-tracking        | Starts automatically on session ready                                                                            |
| Background tracking  | Periodic re-tracking after each run                                                                              |
| Recovery             | Re-tracks once AR tracking is back; outlines that may have moved stay hidden until their object is tracked again |
| Confidence filtering | Rejects low-confidence results automatically                                                                     |

***

## XREAL Aura Sample

The repository also ships `:xreal-aura-vps`, the same SDK on Android XR glasses such as XREAL Aura. It builds each `CameraFrame` from a Camera2 still and the Jetpack XR head pose, sends the whole camera frame at 1280 × 720, and anchors the map mesh and object outlines in the room with SceneCore. It runs map and MapSet localization and object tracking from the same `multiset.properties`; map scanning is not part of it. It needs an Android XR device with a world-facing camera and Android 14 or newer. See the [repository README](https://github.com/MultiSet-AI/multiset-android-sdk) for its setup and permissions.

***

## Getting Started

1. Initialize the SDK and authenticate in `MainActivity`
2. **For localization:** configure `LocalizationConfig`, then launch `MultiSetLocalizationActivity`
3. **For object tracking:** configure `ObjectTrackingConfig`, then launch `ObjectTrackingActivity`
4. **For map scanning:** open Create Map from the Mapping card

See [LocalizationConfig](/native-sdk/android-native/api-reference/localizationconfig.md) and [ObjectTrackingConfig](/native-sdk/android-native/api-reference/objecttrackingconfig.md) for full configuration options.


---

# 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://docs.multiset.ai/native-sdk/android-native/sample-activities.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.
