# Print output for @column tags ?> ScannerFragment.Listener | Android Developers

Most visited

Recently visited

ScannerFragment.Listener

public static interface ScannerFragment.Listener

com.vuzix.sdk.barcode.ScannerFragment.Listener


Interface for those who want to be notified when a barcode is identified.

Summary

Public methods

abstract void onError()

An irrecoverable error has occurred within the ScannerFragment.

abstract void onScanResult(Bitmap bitmap, ScanResult[] results)

One or more barcodes have been identified.

Public methods

onError

public abstract void onError ()

An irrecoverable error has occurred within the ScannerFragment. The fragment should be removed from your activity upon this method being invoked. This method will be invoked on the main application thread.

onScanResult

public abstract void onScanResult (Bitmap bitmap, 
                ScanResult[] results)

One or more barcodes have been identified. Note that this method will be called repeatedly as a barcode remains in the scanning rect. If you only want to be notified once, you should unregister your listener during this method call. This method will be invoked on the main application thread.

Parameters
bitmap Bitmap: the bitmap in which barcodes were found

results ScanResult: an array of ScanResult