Skip to content

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 responsible of supplying platform specific services to the NativeEvsKit, like bluetooth communication or loading file resources like images and fonts.

Initialization

The SDK engine, which is accessed by using the Evs class, should be initialized and started once, when your application loads.

All SDK API calls will be available only after start() was called:

// Note: when developing an Android application,
// Evs.init() must be called before calling Evs.instance().start()
Evs.init(context)
Evs.instance().start()
// With the the SDK fluent API you can also use:
Evs.init(context).start()
Evs.instance().start()

Termination

Upon application termination, in is recommended to deactivate the SDK functionality.

//stopping the SDK functionality
Evs.instance().stop()
//stopping the SDK functionality
Evs.instance().stop()

Logging

You may set a logger to the SDK to expose log information.

To do that, use the default SDK logger, which writes logs to the os_log(iOS) or logcat(Android):

//Start the default logger

Evs.startDefaultLogger()

You can also implement a logger of your own by calling:

Evs.setLogger(logger)

Learn about Communicating with the glasses