Libraries & API
Overview
The Maverick AI SDK is built with Kotlin Multiplatform (KMP), providing a shared codebase across Android and iOS. It bootstraps all services and exposes them through the Evs singleton.
All Kotlin code samples in this documentation apply to both Compose Multiplatform and Native Android projects. Swift samples show the iOS-specific syntax, where the Evs singleton is accessed via Evs.shared.
Supported Integration Paths
| Integration Path | Description | Guide | Sample |
|---|---|---|---|
| Compose Multiplatform (KMP) | Share UI and business logic across Android and iOS in a single codebase | Setup | kmp-compose-sample |
| Native Android | Standard Android project | Setup | android-native |
| Native iOS | Standard Xcode project | Setup | ios-native |
Delivery Options
| Platform | Delivery | Repository |
|---|---|---|
| iOS | Swift Package Manager (SPM) | mav-ai-ios-spm |
| Android | Maven (GitHub Packages) | mav-ai-android-maven |
| KMP / Compose | Maven (GitHub Packages) | mav-ai-android-maven |
Maps, Navigation, and more
Additional SDK packages (Maps, Navigation, Video, Speaker) are planned for future releases. See the Roadmap for details.
API Structure
The SDK exposes several interfaces to enable developers to control and interact with the glasses.
Architecture Overview
┌─────────────────────────────────────────────────────────────────┐
│ Your Application │
└──────────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Evs (SDK Entry Point) │
│ │
│ init() · showUI() · glassesService · screenService · ... │
└──────────────────────────────┬──────────────────────────────────┘
│
┌──────────┬───────────┼───────────┬──────────┐
▼ ▼ ▼ ▼ ▼
┌─────────────┐┌──────────┐┌──────────┐┌──────────┐┌──────────┐
│ Connection ││ Display ││ Screens ││ Vision ││ Mic │
│─────────────││──────────││──────────││──────────││──────────│
│ M2Glasses ││ M2Display││ M2Screen ││M2AIVision││ M2Mic │
│ Service ││ Service ││ Service ││ Service ││ Service │
│ ││ ││ ││ ││ │
│ • Connect ││ • Bright-││ • Screen ││ • Stream ││ • Record │
│ • Scan ││ ness ││ Stack ││ • Snap ││ • Audio │
│ • State ││ • On/Off ││ • Render ││ • Config ││ Data │
│ • Events ││ ││ ││ ││ │
└─────────────┘└──────────┘└──────────┘└──────────┘└──────────┘
┌─────────────┐┌──────────┐┌──────────┐┌──────────┐
│ Sensors ││ OTA ││Resources ││ Logger │
│─────────────││──────────││──────────││──────────│
│ M2Sensors ││ M2Ota ││M2Resource││M2Logger │
│ Service ││ Service ││ Service ││ Service │
│ ││ ││ ││ │
│ • IMU ││ • FW ││ • Fonts ││ • Log │
│ • Heading ││ Update ││ • Images ││ Levels │
│ • Location ││ • Version││ • Texture││ • Sources│
└─────────────┘└──────────┘└──────────┘└──────────┘
┌─────────────────────────────────────────────────────────────────┐
│ UI Kit │
│ │
│ M2Screen · M2Drawable · M2Text · M2Rect · M2Image · M2Group │
│ M2Animator · M2Panel · M2ArScene · M2ArPanel · M2ArGeometry │
└─────────────────────────────────────────────────────────────────┘
Interfaces
The Evs singleton is the entry point for the whole SDK functionality.
It exposes service properties directly, giving access to the SDK features as follows:
Evs Property |
Service Type | Description | Example |
|---|---|---|---|
glassesService |
M2GlassesService |
Handles the glasses state and connection | Battery %, serial number, connect/disconnect |
displayService |
M2DisplayService |
Handles the glasses display | Brightness, turn display off |
screenService |
M2ScreenService |
Handles the glasses UI screens | Add screen, remove screen |
sensorsService |
M2SensorsService |
Handles the glasses sensors | Enable/disable sensors |
visionService |
M2AIVisionService |
Handles the on-board AI vision sensor | Start capture, stream, snap |
micService |
M2MicService |
Handles the on-board microphone | Start/stop mic, receive audio |
resourcesService |
M2ResourcesService |
Handles fonts, images and textures | Upload image/font, bind to drawables |
otaService |
M2OtaService |
Handles the glasses firmware updates | Start firmware update, version check |
preferencesService |
M2PreferencesService |
SDK/app preference persistence | Store/read SDK settings |
logger |
M2LoggerService |
SDK logging and diagnostics | Hook SDK logs for troubleshooting |
Stock UI entry point:
Evs.showUI(M2ShowUIOption.DefaultConfigure)Evs.showUI(M2ShowUIOption.DefaultAdjust)Evs.showUI(M2ShowUIOption.DefaultOta)
See Also
- KMP Setup - Compose Multiplatform project setup
- Android Setup - Native Android project setup
- iOS Setup - Native iOS project setup