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

# Android Native

## Overview

The MultiSet Android SDK provides Visual Positioning System (VPS) localization and Object Tracking capabilities for Android applications. It enables precise indoor and outdoor localization using camera-based visual recognition against pre-mapped 3D environments, and detects pre-registered physical objects in AR with animated 3D mesh visualization.

**GitHub Repository:** <https://github.com/MultiSet-AI/multiset-android-sdk.git>

## Table of Contents

### Sample Activities

* [MainActivity](/multiset/native-support/android-native/sample-activities/mainactivity.md) - Authentication, SDK initialization, and navigation
* [MultiSetLocalizationActivity](/multiset/native-support/android-native/sample-activities/multisetlocalizationactivity.md) - Unified AR localization (single-frame & multi-frame)
* [ObjectTrackingActivity](/multiset/native-support/android-native/sample-activities/objecttrackingactivity.md) - AR object detection and tracking with animated mesh overlay

### API Reference

* [LocalizationConfig](/multiset/native-support/android-native/api-reference/localizationconfig.md) - Configuration parameters for localization behavior
* [ObjectTrackingConfig](/multiset/native-support/android-native/api-reference/objecttrackingconfig.md) - Configuration parameters for object tracking behavior

## Quick Start

### 1. Add Dependencies

Add the MultiSet SDK AAR to your app's `libs/` directory and configure dependencies:

```gradle
dependencies {
    implementation files('libs/multiset-sdk.aar')

    // ARCore
    implementation 'com.google.ar:core:1.46.0'
    implementation 'com.github.RGregat:sceneform-android:1.24.6'

    // Networking
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    implementation 'com.squareup.okhttp3:okhttp:4.12.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'

    // Coroutines
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2'

    // Image Processing
    implementation 'com.google.mlkit:vision-common:17.3.0'
}
```

### 2. Credentials Setup

Create a `multiset.properties` file in your project root with your credentials:

```properties
MULTISET_CLIENT_ID=your_client_id
MULTISET_CLIENT_SECRET=your_client_secret
MULTISET_MAP_CODE=your_map_code
MULTISET_MAP_SET_CODE=
MULTISET_OBJECT_CODES=OBJ_001,OBJ_002
```

| Property                 | Description                      | Required                     |
| ------------------------ | -------------------------------- | ---------------------------- |
| `MULTISET_CLIENT_ID`     | Your client identifier           | Yes                          |
| `MULTISET_CLIENT_SECRET` | Your secret key                  | Yes                          |
| `MULTISET_MAP_CODE`      | Single map identifier            | One of these is required     |
| `MULTISET_MAP_SET_CODE`  | MapSet identifier                | One of these is required     |
| `MULTISET_OBJECT_CODES`  | Comma-separated object code list | Required for object tracking |

### 3. Initialize the SDK

```kotlin
val config = MultiSetConfig.Builder(clientId, clientSecret)
    .mapCode(mapCode)
    .enableMeshVisualization(true)
    .backgroundLocalization(true)
    .build()

MultiSetSDK.initialize(context, config, callback)
```

### 4. Implement Callbacks

```kotlin
class MainActivity : AppCompatActivity(), MultiSetCallback {
    override fun onSDKReady() { /* SDK initialized */ }
    override fun onAuthenticationSuccess() { /* Ready for localization and tracking */ }
    override fun onAuthenticationFailure(error: String) { /* Handle error */ }
    override fun onLocalizationSuccess(result: LocalizationResult) {
        // Access result.mapCode, result.mapCodes, result.position, result.rotation, result.confidence
    }
    override fun onLocalizationFailure(error: String) { /* Handle failure */ }
    override fun onTrackingStateChanged(state: TrackingState) { /* Handle state change */ }
    override fun onObjectTrackingSuccess(result: ObjectTrackingResult) {
        // Access result.objectCode, result.objectCodes, result.position, result.rotation, result.confidence
    }
    override fun onObjectTrackingFailure(error: String) { /* Handle tracking failure */ }
}
```

### 5. Retrieve Localization Result

The localization result is delivered via `onLocalizationSuccess` callback and can also be retrieved at any time:

```kotlin
val lastResult = MultiSetSDK.getLastLocalizationResult()
```

## Requirements

* Android API Level 28+ (Android 9.0)
* Target SDK 36
* Java 17
* Kotlin 2.2.0+
* ARCore compatible device
* Camera permission
* Internet connectivity

## License

Copyright (c) 2026 MultiSet AI. All rights reserved. Licensed under the MultiSet License. For license details, visit [www.multiset.ai](https://www.multiset.ai).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://multiset.gitbook.io/multiset/native-support/android-native.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
