> 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/api-reference.md).

# API Reference

API reference index for the MultiSet Android SDK, covering the FrameSource integration boundary, sessions, the polling API with map and geo alignment, map scanning, configuration and callbacks.

This section provides detailed API documentation for the MultiSet Android SDK components.

## Authentication

### [Authentication](https://docs.multiset.ai/native-sdk/android-native/api-reference/authentication.md)

Authenticate with your client ID and secret, or keep the secret on your server and give the SDK a `MultiSetTokenProvider`.

***

## The Integration Boundary

### [FrameSource and Sessions](https://docs.multiset.ai/native-sdk/android-native/api-reference/framesource.md)

The SDK carries no ARCore, Sceneform or Jetpack XR dependency. Your app supplies camera frames through the `FrameSource` interface, and the SDK runs the capture loop as a session object. This page covers `FrameSource`, `CameraFrame`, `LocalizationSession`, `ObjectTrackingSession`, run stages, tracking breaks, `MultiSetError` and `FalsePositiveInfo`.

**Key Features:**

* One interface to implement, on any Android XR runtime
* Session objects that own scheduling, retry, background re-localization and recovery after a tracking break
* Run stages for progress UI, foreground and background
* Classified failures rather than free-text error strings
* Raw stateless suspend APIs when you want to drive capture yourself

### [Map Scanning (Non-LiDAR)](https://docs.multiset.ai/native-sdk/android-native/api-reference/map-scanning.md)

Record a new map with the device camera, save it as a draft and upload it. Your app supplies frames through `MultiSetMappingSource`, and `MultiSetSDK.mapping` runs the scan.

***

## Configuration

### [LocalizationConfig](https://docs.multiset.ai/native-sdk/android-native/api-reference/localizationconfig.md)

A singleton object in the sample app that provides centralized configuration for localization. Controls timing, quality, and feature settings for the AR localization activity. The same settings exist on `MultiSetSDKConfig` and `LocalizationSession`.

**Key Features:**

* Localization behavior settings (auto-localize, background localization, relocalization, first until success)
* Multi-frame capture configuration
* Confidence thresholds
* False-positive rejection (pose consistency)
* Query mode selection for single-frame and multi-frame localization
* GPS hint integration
* Localization hints (map subset, position, floor height, search radius, 2D filtering)
* Runtime, persisted configuration via the in-app Settings dialog
* UI feedback options
* Image quality settings

### [ObjectTrackingConfig](https://docs.multiset.ai/native-sdk/android-native/api-reference/objecttrackingconfig.md)

A singleton object in the sample app that provides centralized configuration for object tracking. Controls how `ObjectTrackingActivity` detects and tracks pre-registered physical objects in AR.

**Key Features:**

* Object code registration (up to 10 objects)
* Auto-tracking and background tracking settings
* Confidence threshold filtering
* Re-tracking once AR tracking recovers
* Image quality settings

***

## Polling

### [Polling API](https://docs.multiset.ai/native-sdk/android-native/api-reference/polling-api.md)

Everything you can read from `MultiSetSDK` and its sessions at any time or on every frame: run and session state, and (from Android SDK 2.4.1) the map and geo alignment, conversions between the AR session, the map and Earth, and the device's live position and heading.

***

## Quick Reference

| Component                    | Description                                                                        |
| ---------------------------- | ---------------------------------------------------------------------------------- |
| `LocalizationConfig`         | Centralized configuration for localization behavior (sample app)                   |
| `ObjectTrackingConfig`       | Centralized configuration for object tracking behavior (sample app)                |
| `MultiSetSDK`                | Main SDK entry point for initialization, sessions, raw APIs and map scanning       |
| `MultiSetSDKConfig.Builder`  | Configuration builder for SDK setup                                                |
| `MultiSetSDKCallback`        | Interface for SDK event callbacks                                                  |
| `MultiSetTokenProvider`      | Supplies access tokens from your server, in place of the client ID and secret      |
| `FrameSource`                | The interface your app implements to supply camera frames                          |
| `CameraFrame`                | A platform-neutral camera frame (image, pose, intrinsics, orientation, timestamp)  |
| `LocalizationSession`        | Runs the localization capture loop                                                 |
| `ObjectTrackingSession`      | Runs the object tracking capture loop                                              |
| `LocalizationStage`          | A run's stage: `Capturing`, `Uploading`, `AwaitingResponse`, `Idle`                |
| `RecoveryPhase`              | Recovery after a tracking break: `NONE`, `WAITING_FOR_TRACKING`, `REALIGNING`      |
| `LocalizationResult`         | Result object containing pose data from localization                               |
| `LocalizationAttemptFailure` | One localization attempt without a fix: its reason, attempt count and retry timing |
| `ObjectTrackingResult`       | Result object containing pose data from object tracking                            |
| `GeoHintProvider`            | Supplies the GPS fix sent as a geo hint                                            |
| `GeoPose`                    | The fix in geographic terms, on `LocalizationResult.geoPose`                       |
| `MapAlignment`               | Where the map sits in the AR session, with map and session conversions             |
| `GeoAlignment`               | Where the AR session sits on Earth, with Earth and session conversions             |
| `AlignmentAvailability`      | Whether an alignment can be used, and why not                                      |
| `Geolocation`, `GeoAccuracy` | A position on Earth with a heading, and its estimated accuracy                     |
| `MapGeoreference`            | Where a map sits on Earth: its origin and heading                                  |
| `HeadingMode`                | Which device axis a heading describes: `CAMERA_FORWARD` or `DEVICE_TOP`            |
| `MultiSetError`              | Classified failure (`SERVER`, `AUTH`, `NETWORK`, `TRANSIENT`)                      |
| `FalsePositiveInfo`          | Details of a localization result discarded as inconsistent                         |
| `AnchorTrust`                | Standing of the pose consistency anchor (`PROVISIONAL`, `CORROBORATED`, `TRUSTED`) |
| `QueryMode`                  | Search strategy for localization (`VPS1`, `VPS2`)                                  |
| `LocalizationMode`           | `SINGLE_FRAME` (the default) or `MULTI_FRAME`                                      |
| `TrackingState`              | AR tracking state you report to a session (`TRACKING`, `PAUSED`, `STOPPED`)        |
| `MultiSetMapping`            | Map scanning, from preview to an uploaded draft (`MultiSetSDK.mapping`)            |
| `MultiSetMappingSource`      | The interface your app implements to supply frames to a scan                       |

{% hint style="info" %}
`MultiSetConfig` and `MultiSetCallback` were renamed to `MultiSetSDKConfig` and `MultiSetSDKCallback` in version 1.16.0.
{% endhint %}

***

## MultiSetSDKCallback Interface

The full set of callbacks delivered by the SDK:

| Callback                                            | Trigger                                                                                                                                                                   |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `onSDKReady()`                                      | SDK initialized, authentication starting                                                                                                                                  |
| `onAuthenticationSuccess()`                         | Authentication successful                                                                                                                                                 |
| `onAuthenticationFailure(error)`                    | Authentication failed                                                                                                                                                     |
| `onLocalizationSuccess(result)`                     | Localization succeeded                                                                                                                                                    |
| `onLocalizationFailure(error)`                      | Localization failed                                                                                                                                                       |
| `onLocalizationAttemptFailed(failure)`              | An attempt ended without a fix, silent retries included. See [Each attempt](https://docs.multiset.ai/native-sdk/android-native/api-reference/framesource.md#each-attempt) |
| `onLocalizationFalsePositive(info)`                 | Localization result discarded as inconsistent with the device trajectory                                                                                                  |
| `onLocalizationCorrected(from, to, trust)`          | Agreeing fixes out-voted the anchor and the map moved                                                                                                                     |
| `onAnchorTrustChanged(trust)`                       | The pose consistency anchor's standing changed                                                                                                                            |
| `onRecoveryPhaseChanged(phase, needsRealignment)`   | The recovery after a tracking break moved on; hide map content while `needsRealignment`                                                                                   |
| `onAlignmentChanged(map, geo)`                      | The map or geo alignment changed, or was cleared (`null`). See [Polling API](https://docs.multiset.ai/native-sdk/android-native/api-reference/polling-api.md)             |
| `onLocalizationStageChanged(stage, isBackground)`   | A localization run moved to another stage                                                                                                                                 |
| `onTrackingStateChanged(state)`                     | A session was told a new AR tracking state. Fires once per change, however many sessions you report it to                                                                 |
| `onObjectTrackingSuccess(result)`                   | Object tracked successfully                                                                                                                                               |
| `onObjectTrackingFailure(error)`                    | Object tracking failed                                                                                                                                                    |
| `onObjectTrackingStageChanged(stage, isBackground)` | An object tracking run moved to another stage                                                                                                                             |

Every callback after `onLocalizationFailure` except `onTrackingStateChanged` has a default no-op implementation, so override only what you need. Authentication comes from `initialize`; every other event comes from the sessions `MultiSetSDK` builds, which report here as well as through their own lambdas.

***

## Related

* [FrameSource and Sessions](https://docs.multiset.ai/native-sdk/android-native/api-reference/framesource.md)
* [Polling API](https://docs.multiset.ai/native-sdk/android-native/api-reference/polling-api.md)
* [Map Scanning (Non-LiDAR)](https://docs.multiset.ai/native-sdk/android-native/api-reference/map-scanning.md)
* [Sample Activities](https://docs.multiset.ai/native-sdk/android-native/sample-activities.md)
* [Android Native Overview](https://docs.multiset.ai/native-sdk/android-native.md)


---

# 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/api-reference.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.
