|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.device.ScanManager
public class ScanManager
The ScanManager class provides developers access to barcode reader related in the device
Constructor Summary | |
---|---|
ScanManager()
|
Method Summary | |
---|---|
boolean |
closeScanner()
Turn off the power for the bar code reader. |
int |
getOutputMode()
get current the scan result output mode |
int |
getOutputParameter(int type)
get the scan successed behavior states |
boolean |
getScannerState()
get the scanner power states |
int |
getScannerType()
|
boolean |
getTriggerLockState()
get the scan trigger status |
boolean |
lockTriggler()
Set the scan trigger inactive (disable the scan button) |
boolean |
openScanner()
Turn on the power for the bar code reader. |
boolean |
resetScannerParameters()
Set factory defaults for all barcode symbology types. |
boolean |
setOutputParameter(int type,
int value)
Set the scan behavior. |
boolean |
startDecode()
Call this method to start decoding. |
boolean |
stopDecode()
This stops any data acquisition currently in progress. |
boolean |
switchOutputMode(int mode)
Use this function to set the output mode of the barcode reader (either send output to text box or as Android intent). |
boolean |
unlockTriggler()
Set the scan trigger active (enable the scan button) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScanManager()
Method Detail |
---|
public boolean switchOutputMode(int mode)
Use this function to set the output mode of the barcode reader (either send output to text box or as Android intent).
TextBox Mode allows the captured data to be sent to the text box in focus.
Intent mode allows the captured data to be sent as an implicit Intent. Application interested in the scan data should register an action as urovo.rcv.message broadcast listerner.
In the onReceive(Context context, Intent arg1) method, get the information as follow:byte[] barcode=arg1.getByteArrayExtra("barcode");
int barcodelen=arg1.getIntExtra("length",0);
byte type=arg1.getByteExtra("barcodeType",(byte)0);
The information are bar code data, length of bar code data, and bar code type (symbology).
mode
- Set to 0 if barcode output is to be sent as intent, barcode output is to be sent to the text box in focus
public int getOutputMode()
public boolean setOutputParameter(int type, int value)
type
- The behavior.value
- the behavior value: 0 or 1
Type | Value |
1 | 0 No beep; 1 Beep |
2 | 0 No vibration; 1 Vibrate |
3 | 0 Do not append CR on scan output string; 1 Append CR on scan output string |
public int getOutputParameter(int type)
type
- is behavior type: 1 is beep; 2 is vibrate; 3 Append 'return'character;
public boolean openScanner()
public boolean closeScanner()
public boolean getScannerState()
public boolean stopDecode()
public boolean startDecode()
public boolean lockTriggler()
public boolean unlockTriggler()
public boolean getTriggerLockState()
public int getScannerType()
public boolean resetScannerParameters()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |