Code Scanner module for the Eitri Android framework. This module provides a standardized interface for handling camera permissions and scanning codes, integrating seamlessly with the Eitri runtime.
- Android 5.0 (API level 21) or later
- Google Play Services available on the target device
The eitri-android-code-scanner artifact is available on Maven Central.
dependencies {
implementation("tech.eitri:eitri-android-code-scanner:$version")
}Make sure to replace $version or ${version} with the desired version of the module. You can find the latest version on Maven Central.
import tech.eitri.android.codeScanner.CodeScannerModule
// [...]
val machineContext = EitriMachineInstanceManager.start()
val mainEitriMachine = machineContext.mainMachine
// configure eitri-machine [...]
// register modules
mainEitriMachine.modules.register(CodeScannerModule())CodeScannerModule: The entry point for the module, implementing theEitriModuleprotocol. It registers the available code scanner methods with the Eitri runtime.
The module exposes its functionality under the codeScanner namespace.
Examples of what methods are avaliable and how they can be used can be consulted on the Eitri Bifrost documentation page