Skip to content

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

%%{init: {"flowchart": {"nodeSpacing": 34, "rankSpacing": 44, "padding": 12, "htmlLabels": true}}}%%
flowchart TB
    App["Your application"]
    Evs["<b>Evs</b> — SDK entry point<br/>init() · showAppUI()<br/>glassesService · screenService · …"]
    App --> Evs

    subgraph Device["Connection & display"]
        Conn["Connection<br/><code>M2GlassesService</code><br/>connect · scan · state"]
        Disp["Display<br/><code>M2DisplayService</code><br/>brightness · on/off"]
        OTA["Firmware<br/><code>M2OtaService</code><br/>update · version"]
        Log["Logger<br/><code>M2LoggerService</code><br/>levels · sources"]
        Conn ~~~ OTA
        Disp ~~~ Log
    end

    subgraph Sense["Capture & sensing"]
        Vis["Vision<br/><code>M2AIVisionService</code><br/>stream · snapshot"]
        Mic["Microphone<br/><code>M2MicService</code><br/>record · audio data"]
        Sens["Sensors<br/><code>M2SensorsService</code><br/>IMU · heading"]
        ET["Eye tracker<br/><code>M2EyeTrackerService</code><br/>gaze data · analyzers"]
        Vis ~~~ Sens
        Mic ~~~ ET
    end

    subgraph Render["Rendering"]
        Scr["Screens<br/><code>M2ScreenService</code><br/>screen stack · render"]
        Res["Resources<br/><code>M2ResourcesService</code><br/>fonts · images · textures"]
    end

    UIKit["<b>UI kit</b> — what you draw on the glasses<br/>M2Screen · M2Drawable · M2Text · M2Rect · M2Image<br/>M2Group · M2Animator · M2Panel · M2ArScene"]

    Evs --> Device
    Evs --> Sense
    Evs --> Render
    Render --> UIKit

    %% invisible links stack the three groups instead of spreading them
    %% across a diagram too wide to stay legible
    Device ~~~ Sense
    Sense ~~~ Render

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
eyeTrackerService M2EyeTrackerService Eye-tracker device control and eye-feature analysis Enable tracker, register analyzers, receive results
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.showAppUI(M2AppUIOption.DefaultConfigure)
  • Evs.showAppUI(M2AppUIOption.DefaultAdjust)
  • Evs.showAppUI(M2AppUIOption.DefaultOta)

See Also