SDK Engine
Overview
The SDK Engine is responsible for bootstrapping the SDK, meaning allocating all the relevant runtime components and exposing the SDK functionalities.
The SDK Engine also supplies platform-specific services such as Bluetooth communication, resource handling (fonts, images), and sensor data processing.
Initialization
The SDK engine, accessed through the Evs class, should be initialized and started once when your application loads.
All SDK API calls will be available only after initialization:
Resources
Where to put your API key, glasses content (M2Image, M2Font, AR meshes), and phone-UI assets - and which platforms need a resolver - is covered in the dedicated Resources guide.
Quick recap:
| Project | Need a resolver? |
|---|---|
| Native Android | No - drop files in app/src/main/assets/ and the SDK finds them |
| Native iOS | No - drop files in the iOS app bundle and the SDK finds them. Do add the one-time Compose-resources rsync Run Script (see iOS setup) |
| KMP Compose Multiplatform | Yes - register one resolver that bridges to Res.readBytes("files/$path"). See Resources guide |
Termination
Upon application termination, it is recommended to deactivate the SDK functionality:
Logging
The SDK logger starts automatically when the SDK is initialized. It writes to os_log (iOS) or logcat (Android) and to a local rolling log file.
Use Evs.logger to write application-level log messages:
To enable debug-level logging (suppressed by default):
Stock UI
The SDK provides built-in UI flows for common operations:
| Option | Purpose |
|---|---|
M2ShowUIOption.DefaultConfigure |
BLE scanning, connection, and simulator selection |
M2ShowUIOption.DefaultAdjust |
Display position, touch, auto-brightness, proximity |
M2ShowUIOption.DefaultOta |
Firmware update |
For custom UI flows, see Communication - Native BLE Scanning and Display - Using Your Own Adjust View.
See Also
- Connection & Communication - BLE connection and data exchange
- Display - Brightness and display control
- Glasses - Device info, battery, and system events