Click or drag to resize

BarcodeManager Class

BarcodeManager

To decode bar codes with this class, use the following steps:

  1. Obtain an instance of BarcodeManager with BarcodeManager();
  2. Register the listeners needed in your application from the available ones: StartListener, ReadListener, StopListener and TimeoutListener;
  3. To begin a decode session, call startDecode(). Your registered StartListener/ReadListener/TimeoutListener will be called when a successful decode occurs or if the configured timeout expires, etc;
  4. Call stopDecode() to end the decode session;
  5. Call release() to release all registered StartListener/ReadListener/TimeoutListener/StopListener.

Configuration persistance: All the configuration changes done using the BarcodeManager are natively not persistent to the device reboot, they are kept only in the current device session. If you want to persist your changes in flash and keep them across a system reboot the only existing way is to call explicitally commitProperties(). Beware that the decoding system configuration is restored from flash every time the decoding service restart and so any configuration not stored persistently could be lost if the service is killed (and consequently restarted) by the Android OS. It is a rare event that could happens for many reasons (low resources, execution exception, not responding service, etc...), the decoding system is usually restored but any configuration not stored persistently could be lost.

Inheritance Hierarchy
System.Object
Com.Datalogic.Decode.BarcodeManager

Namespace: Com.Datalogic.Decode
Assembly: datalogic-xamarin-sdk (in datalogic-xamarin-sdk.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class BarcodeManager : Object, 
	IPropertyEditor, IPropertyGetter, IJavaObject, IDisposable, IJavaPeerable

The BarcodeManager type exposes the following members.

Constructors
NameDescription
Public methodBarcodeManager
Initializes a new instance of the BarcodeManager class
Public methodBarcodeManager
Initializes a new instance of the BarcodeManager class
Top
Properties
NameDescription
Public propertyCurrentInputDevice
To be added.
Public propertyCustomOcrItems
To be added.
Public propertyIsInitialized
Checks if the Scanner Service is correctly initialized.
Public propertyJniPeerMembers
To be added.
Public propertyKeycodeBarcode
To be added.
Public propertySupportedInputDevices
To be added.
Public propertyThresholdClass
To be added.
Public propertyThresholdType
To be added.
Top
Methods
NameDescription
Public methodAddDeinitListener
Registers a DeinitListener to be notified when a event of Scanner de-initiliazion is triggered.
Public methodAddFrameCaptureListener
Registers a FrameCaptureListener to be notified when a frame capture event is triggered.
Public methodAddFrameSaveListener
Registers a FrameSaveListener to be notified when a frame save event is triggered.
Public methodAddInitListener
Registers a InitListener to be notified when a event of completed Scanner initialization is triggered.
Public methodAddPresentationStateListener
Registers a PresentationStateListener to be notified when a presentation mode state change event is triggered.
Public methodAddReadListener
Registers a ReadListener to be notified when a read event is triggered.
Public methodAddStartListener
Registers a StartListener to be notified when a scan started event is triggered.
Public methodAddStopListener
Registers a StopListener to be notified when a scan stopped event is triggered.
Public methodAddTimeoutListener
Registers a TimeoutListener to be notified when a scan timeout event is triggered.
Public methodCommitProperties
Saves the configuration.
Public methodEnableAllSymbologies
Enables or disables all supported symbologies.
Public methodEnableSymbology
Enables or disables a barcode symbology type.
Public methodGetPropertyAvailability
Retrieves the availability, the support, for the passed programming parameters.
Public methodGetPropertyInts
Gets one or more label programming parameters of type Integer.
Public methodGetPropertyRanges
Gets one or more property ranges for the passed programming parameters.
Public methodGetPropertyStrings
Gets one or more label programming parameters of type String.
Public methodIsSymbologyEnabled
Returns current enable setting for a particular barcode symbology.
Public methodIsSymbologySupported
Return true if the device's decoder is able to read a particular barcode symbology.
Public methodPressTrigger
Call this method to simulate a trigger button pressure.
Public methodRelease
Removes and clears all the registered listeners, in case some application did not call removal methods.
Public methodReleaseTrigger
Call this method to simulate a release of a the trigger button.
Public methodRemoveDeinitListener
Unregisters a DeinitListener associated with the decoder.
Public methodRemoveFrameCaptureListener
Unregisters a FrameCaptureListener associated with the decoder.
Public methodRemoveFrameSaveListener
Unregisters a FrameSaveListener associated with the decoder.
Public methodRemoveInitListener
Unregisters a InitListener associated with the decoder.
Public methodRemovePresentationStateListener
Unregisters a PresentationStateListener associated with the decoder.
Public methodRemoveReadListener
Unregisters a ReadListener associated with the decoder.
Public methodRemoveStartListener
Unregisters a StartListener associated with the decoder.
Public methodRemoveStopListener
Unregisters a StopListener associated with the decoder.
Public methodRemoveTimeoutListener
Unregisters a TimeoutListener associated with the decoder.
Public methodSetDefaults
Set factory defaults for all barcode symbology types.
Public methodSetPropertyInts
Sets one or more label programming parameters of type Integer.
Public methodSetPropertyStrings
Sets one or more label programming parameters of type String.
Public methodStartDecode
Call this method to start decoding.
Public methodStartDecode
Call this method to start decoding.
Public methodStopDecode
This stops any data acquisition currently in progress.
Top
Fields
NameDescription
Public fieldActionStartDecode
To be added.
Public fieldActionStopDecode
To be added.
Top
Remarks
BarcodeManager gives developers access to decoder related methods of the device.

To decode bar codes with this class, use the following steps:

  1. Obtain an instance of BarcodeManager with BarcodeManager();
  2. Register the listeners needed in your application from the available ones: StartListener, ReadListener, StopListener and TimeoutListener;
  3. To begin a decode session, call startDecode(). Your registered StartListener/ReadListener/TimeoutListener will be called when a successful decode occurs or if the configured timeout expires, etc;
  4. Call stopDecode() to end the decode session;
  5. Call release() to release all registered StartListener/ReadListener/TimeoutListener/StopListener.

Configuration persistance: All the configuration changes done using the BarcodeManager are natively not persistent to the device reboot, they are kept only in the current device session. If you want to persist your changes in flash and keep them across a system reboot the only existing way is to call explicitally commitProperties(). Beware that the decoding system configuration is restored from flash every time the decoding service restart and so any configuration not stored persistently could be lost if the service is killed (and consequently restarted) by the Android OS. It is a rare event that could happens for many reasons (low resources, execution exception, not responding service, etc...), the decoding system is usually restored but any configuration not stored persistently could be lost.

[Android Documentation]

See Also