Click or drag to resize

KeyboardManagerMapIntent Method

Assigns an Intent to a physical key.

Namespace:  Com.Datalogic.Decode
Assembly:  datalogic-xamarin-sdk (in datalogic-xamarin-sdk.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
public virtual int MapIntent (Com.Datalogic.Device.Input.VScanEntry scanCode, Android.Content.Intent intent);

Parameters

scanCode
Type: Com.Datalogic.Device.Input.VScanEntry
a VScanEntry representing the virtual scan code.
intent
Type: Android.Content.Intent
Intent used to launch an Android activity through the Context.startActivity(Intent intent) method. Example code to make Camera Activity capture an image on the front scan trigger pressure: (new KeyboardManager()).mapIntent(new VScanEntry(VScanCode.VSCAN_FRONT_TRIGGER), new Intent(MediaStore.ACTION_IMAGE_CAPTURE)); Example code to make BarcodeManager capture a barcode on the front scan trigger pressure and to stop capturing on the front scan trigger release: (new KeyboardManager()).mapIntent(new VScanEntry(VScanCode.VSCAN_FRONT_TRIGGER), new Intent(BarcodeManager.ACTION_START_DECODE));

Return Value

Type: System.Int32
int DeviceException.SUCCESS in case of success, otherwise a possible error code, matching one of the DeviceException error constants.

Exceptions
Exception Condition
DeviceException in case of error, when exceptions are enabled through the ErrorManager singleton.
Remarks
Assigns an Intent to a physical key. If a mapping for the desired physical key is already assigned and saved, it will be overridden.

[Android Documentation]

See Also

Reference