To make it easier for developers to implement the Anyline SDK, it is based on Modules. You can use these Modules to implement your scanning use case into your application.

This section describes how to implement and use the Anyline SDK modules in Windows.

General Module Implementation


All the examples provided here are based on the MRZ Module. Specific implementations can be found in the next section, and in the Windows API Reference.


Setting up your module is done with the following steps:

  1. Add the module view to your XAML layout
  2. Instantiate the view in the constructor of your Page
  3. Set your view configuration on the view in
  4. Initialize the view in the constructor of your Page
  5. Start scanning in the OnCameraOpened() method of your Page
  6. Stop scanning in the OnNavigatedFrom() and also in OnCameraClosed() method of your Page. Also release all resources in OnNavigatedFrom().

Initialize the Anyline SDK Module

On Windows, the modules are Views, that can be added to your layout XAML. The initalization of the module is performed in constructor of the page or in the OnNavigatedTo() lifecycle methods.


Don’t forget to set your Anyline View Configuration

Init Anyline
// 'this' can be passed because our page implements the IEnergyResultListener interface
AnylineScanView.InitAnyline(LicenseKey, this);

Start the Scanning

After the initialization is performed, AnylineScanView.StartScanning() can be called, and should usually be placed in the OnCameraOpened() lifecycle method.

Start scanning

Stop Scanning

AnylineScanView.CancelScanning() stops the scanning process. In order to safely stop the scanning process and releasing all resources on leaving the current page, the following snippet should be placed in the OnNavigatedFrom() lifecycle method.

Cancel scanning
if (AnylineScanView != null)
AnylineScanView = null;

Native Barcode Scanning

As of version 3.17, each Module supports native barcode scanning.

The implementation details can be found at Windows Native Barcode Scanning

Module Specifics

Currently there are two modules available for Windows.

Energy Module

The Anyline Energy module is capable of scanning Analog Electric-, Gas- and Water Meter readings. It is also possible to scan Bar- and QR-codes, which is useful for identifying meters, as well as the Serial Number. Common Digital Meters and Heat Meters can also be scanned.

Energy Module    
Energy Documentation of the Module Windows Module Implementation Details

MRZ Module

The Anyline MRZ module provides the functionality to scan passports and other IDs holding a Machine Readable Zone (MRZ).

MRZ Module    
MRZ Documentation of the Module Windows Module Implementation Details