public class ScanManager
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
boolean |
closeScanner()
close Scanner
|
void |
enableAllSYM(boolean enable)
Enable all barcodes
|
void |
enableSYM(boolean enable,
int symID)
Set up a single barcode
|
void |
enableSYM1D(boolean enable)
Whether to enable all one-dimensional codes
|
void |
enableSYM2D(boolean enable)
Whether to enable all QR codes
|
java.lang.String |
getBroadcastAction()
Customize self action to receive data.
|
java.lang.String |
getBroadcastKey()
Customize self action to receive data.
|
boolean |
getContinueScan()
Check whether continuous scanning is enabled
|
int |
getDecodeTimeout()
Get decoding timeout
|
static ScanManager |
getDefaultInstance(android.content.Context context)
initialization
|
boolean |
getDisableSameBarcode() |
int |
getEndMark()
Get the ending character of the current setting
|
java.lang.String |
getFilter()
Get the currently set filter parameters
|
boolean |
getHandleKey()
Check whether the scan button is enabled
|
int |
getIntervalTime()
Get the current continuous scan interval time
|
boolean |
getMultiDecode()
Check if scanning multiple barcodes is enabled
|
int |
getMultiReadNumber()
Get the number of barcodes scanned multiple times
|
int |
getOPMode()
Get current scan mode
|
boolean |
getPlaySound()
Check if the sound is turned on
|
java.lang.String |
getPrefix()
Get the set barcode prefix
|
int |
getScannerType() |
java.lang.String |
getSuffix()
Set barcode suffix
|
boolean |
getVibrate()
Check if vibration is turned on
|
boolean |
isScannerOpen()
Check if scanning is on
|
boolean |
isSYMEnabled(int symID)
Check whether the current barcode is open
|
boolean |
isSYMSupported(int symID)
Check if the current barcode supports
|
boolean |
openScanner()
open Scanner
|
void |
resetScan()
Reset scan module
|
void |
setBroadcastAction(java.lang.String action)
Customize self action to receive data.
|
void |
setBroadcastKey(java.lang.String key)
Customize self key to receive data.
|
void |
setContinueScan(boolean enable)
Set up continuous scan
|
void |
setDecodeTimeout(int timeout)
Set decoding timeout
|
void |
setDisableSameBarcode(boolean disable)
Set disable send same barcode data.
|
void |
setEndMark(int mark)
Set the end character of the barcode
|
void |
setFilter(java.lang.String filter)
Filter special characters in barcode
|
void |
setHandleKey(boolean enable)
Whether to enable the handle buttons
|
boolean |
setIntervalTime(int interval) |
void |
setLiftToStop(boolean enable)
Lift to stop scanning
|
void |
setMultiDecode(boolean enable)
Set to allow scanning multiple barcodes at once
|
void |
setMultiReadNumber(int number) |
void |
setOPMode(int mode) |
void |
setPlaySound(boolean enable)
Set scan sound
|
void |
setPrefix(java.lang.String prefix)
Set barcode prefix
|
void |
setSuffix(java.lang.String suffix)
Set barcode suffix
|
void |
setSYMValueInts(int[] paramIDList,
int[] symValueList)
Set multiple barcode parameters
|
void |
setVibrate(boolean enable)
Set scan vibration
|
boolean |
startDecode()
start scan
|
boolean |
stopDecode()
stop scan
|
public static ScanManager getDefaultInstance(android.content.Context context)
context
- public int getScannerType()
public boolean openScanner()
public boolean closeScanner()
public boolean startDecode()
public boolean stopDecode()
public boolean isScannerOpen()
public void setPrefix(java.lang.String prefix)
string
- public java.lang.String getPrefix()
public void setSuffix(java.lang.String suffix)
string
- public java.lang.String getSuffix()
public void setFilter(java.lang.String filter)
string
- public java.lang.String getFilter()
public void setPlaySound(boolean enable)
true
- enable, false unenable;public boolean getPlaySound()
public void setVibrate(boolean enable)
trun
- vibration; false turn off vibrationpublic boolean getVibrate()
public void setContinueScan(boolean enable)
true
- turns on continuous scan, false turns off continuous scanpublic boolean getContinueScan()
public void setMultiDecode(boolean enable)
true
- enabled, false unEnabledpublic boolean getMultiDecode()
public void setMultiReadNumber(int number)
Set
- the number of barcodes that can be scanned at one timepublic int getMultiReadNumber()
public void setDisableSameBarcode(boolean disable)
disable
- true to set disable ,false to allow.public boolean getDisableSameBarcode()
public void setBroadcastAction(java.lang.String action)
action
- user set this(not null)public java.lang.String getBroadcastAction()
public void setBroadcastKey(java.lang.String key)
key
- user set this(not null)public java.lang.String getBroadcastKey()
public void setOPMode(int mode)
0
- Broadcast mode, Obtain scan data through registration broadcast1
- Input box mode, in this mode, any input box can be filled with scan barcode2
- Keyboard mode, simulate keyboard input3
- Single input box mode, any input box can be filled with scan barcode, no repetition4
- Clipboard, put the scanned barcode on the clipboard, and the user can paste it anywherepublic int getOPMode()
public void setEndMark(int mark)
0
- none1
- Enter2
- Tabpublic int getEndMark()
public void setHandleKey(boolean enable)
true
- enabled false not workingpublic boolean getHandleKey()
public boolean setIntervalTime(int interval)
interval
- Continuous scan intervalpublic int getIntervalTime()
public void setDecodeTimeout(int timeout)
timeout
- 1000public int getDecodeTimeout()
public void setLiftToStop(boolean enable)
true
- enable; false unEnablepublic void setSYMValueInts(int[] paramIDList, int[] symValueList)
paramIDList
- DecoderConfigValues.ParamIDsymValueList
- public void enableAllSYM(boolean enable)
true
- enable false not enablepublic void enableSYM(boolean enable, int symID)
true
- enable false not enablesymID
- DecoderConfigValues.ParamIDpublic void enableSYM1D(boolean enable)
true
- enable false not enablepublic void enableSYM2D(boolean enable)
true
- enable false not enablepublic boolean isSYMEnabled(int symID)
symID
- DecoderConfigValues.SymbologyIDpublic boolean isSYMSupported(int symID)
symID
- DecoderConfigValues.SymbologyIDpublic void resetScan()