EngineInitializer

Lets Engine know which of the app's Activities is in front, so it can start scanner steps from it. androidx.startup runs it when the app starts, from Engine's manifest, so an app has nothing to do.

An app that turns off androidx.startup's automatic initialization, or runs the verification in a process of its own, runs it in Application.onCreate, before any Activity starts:

AppInitializer.getInstance(context).initializeComponent(EngineInitializer::class.java)

Until it has run, Engine.startSession fails. Run later, it can't see an Activity that is already in front, so a scanner step waits until an Activity next starts.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun create(context: Context)

Starts following the app's Activities. Running it again changes nothing.

Link copied to clipboard
open override fun dependencies(): List<Class<out Initializer<*>>>

It needs no other initializer to run first.