public class DecoderManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
DecoderManager.IDecoderStatusListener
Listener interface for handling a decode result from the Decoder API,application should register the listener
to monitor the decoder result from decode server
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DECODER_TIMEOUT
Decoder timeout alert string information to application
|
Modifier and Type | Method and Description |
---|---|
void |
addDecoderStatusListener(DecoderManager.IDecoderStatusListener listener)
Register decoder listener to listen decode result
|
int |
connectDecoderSRV()
Connect to decoder server,ready for scanning.
|
int |
continuousShoot()
Execute continuous shoot scanning.
|
int |
disconnectDecoderSRV()
disconnect from decoder server,quit from scanning
|
void |
dispatchScanKeyEvent(KeyEvent keyEvent)
Dispatch keyEvent to scanner service for scanning
|
void |
enableLight(int type,
boolean enable)
Enable/disable light for scanning
|
int |
getDataTransferType()
Get scanning result data transfer type
|
int |
getFlashMode()
Get current flash light mode of scanning settings
|
static DecoderManager |
getInstance()
Gets an instance of the scanner manager
|
int |
getScanEfficientMode()
Get scan efficient mode of scanner settings
|
byte[] |
getScanImageBytes()
get scan image bytes for debugging
|
int |
getScanMode()
Get scan mode of scanner settings
|
boolean |
getScannerEnable()
Get scanner enabled/disabled, not implement now
|
int |
getScanSceneMode()
Get scan scene mode of scanner settings
|
boolean |
isContinuousShootState()
If decode server in continuous shoot state
|
boolean |
isInKeyShoot()
if in key shooting state
|
boolean |
isKeyShootEnabled()
key shoot enabled
|
int |
keyShoot(boolean on)
Execute key shoot scanning
|
int |
quitWithReason(int on)
Execute quit scanning
|
void |
removeDecoderStatusListener(DecoderManager.IDecoderStatusListener listener)
Unregister decoder listener, not listen decode result
|
void |
setDataTransferType(int transferType)
Set scanning result data transfer type
|
void |
setFlashMode(int mode)
Set flash light mode of scanning settings
|
void |
setScanEfficientMode(int mode)
Set scan efficient mode of scanner settings
|
void |
setScanMode(int mode)
Set scan mode of scanner settings
|
void |
setScannerEnable(boolean enable)
Enable/disable scanner, not implement now
|
void |
setScanSceneMode(int mode)
Set scan scene mode of scanner settings
|
int |
singleShoot()
Execute single shoot scanning
|
int |
stopContinuousShoot()
Execute stop continuous shoot scanning.
|
void |
stopDecode()
stop decoding in decode server
|
int |
stopShootImmediately()
Execute stop shoot scanning
|
public static final java.lang.String DECODER_TIMEOUT
public static DecoderManager getInstance()
null
- public int keyShoot(boolean on)
true(shooting)
- false(stop shooting)public int quitWithReason(int on)
0(force)
- 1(camera on)public boolean isKeyShootEnabled()
null
- public boolean isInKeyShoot()
null
- public int singleShoot()
null
- public int stopShootImmediately()
null
- public int continuousShoot()
null
- public int stopContinuousShoot()
null
- public boolean isContinuousShootState()
null
- public int connectDecoderSRV()
null
- public int disconnectDecoderSRV()
null
- public void stopDecode()
null
- public int getFlashMode()
null
- public void setFlashMode(int mode)
0:auto
- 1:always on 2: always offpublic void enableLight(int type, boolean enable)
type
- 1:flash light 2:flood light 3: location lightenable
- true:enable false:disablepublic int getDataTransferType()
null
- 0:By
- API 1: By EditText 2: By KeyEvent -1: get failpublic void setDataTransferType(int transferType)
0:By
- API 1: By EditText 2: By KeyEventpublic void dispatchScanKeyEvent(KeyEvent keyEvent)
KeyEvent
- objectpublic void setScannerEnable(boolean enable)
true:enable
- false:disablepublic boolean getScannerEnable()
null
- public int getScanMode()
null
- public void setScanMode(int mode)
0:single
- mode 1: continues mode 2: key hold modepublic int getScanSceneMode()
null
- public void setScanSceneMode(int mode)
0:auto
- 1: indoor 2: outdoorpublic int getScanEfficientMode()
null
- public void setScanEfficientMode(int mode)
0:High-performance
- 1: Fuel efficientpublic byte[] getScanImageBytes()
null
- public void addDecoderStatusListener(DecoderManager.IDecoderStatusListener listener)
Decoder
- callback listenerpublic void removeDecoderStatusListener(DecoderManager.IDecoderStatusListener listener)
Decoder
- callback listener