public abstract class CodeScanner

  1. Object
  2. CodeScanner

Deprecated!!: Please use the cn1-codescan library instead.

A barcode/qrcode scanner API, this class is a singleton, notice that this API might not be implemented for all platforms in which case the getInstance() method will return null!

Constructors

public CodeScanner()

Methods

public static CodeScanner getInstance()Returns the instance of the code scanner, notice that this method is equivalent to Display.getInstance().getCodeScanner().
public abstract void scanQRCode(ScanResult callback)Scans based on the settings in this class and returns the results
public abstract void scanBarCode(ScanResult callback)Scans based on the settings in this class and returns the results

Inherited methods

Constructor details

CodeScanner

public CodeScanner()

Method details

getInstance

public static CodeScanner getInstance()
Returns the instance of the code scanner, notice that this method is equivalent to Display.getInstance().getCodeScanner().

Returns

instance of the code scanner

scanQRCode

public abstract void scanQRCode(ScanResult callback)
Scans based on the settings in this class and returns the results

Parameters

callback ScanResult
scan results

scanBarCode

public abstract void scanBarCode(ScanResult callback)
Scans based on the settings in this class and returns the results

Parameters

callback ScanResult
scan results