Package com.casioeurope.mis.edt
Class ScannerLibrary
Object
ScannerLibrary
public class ScannerLibrary extends Object
The CASIO Enterprise Developer Tools Scanner Library
- Since:
- 2.00
- API Note:
- The Scanner Library is bound to the calling application on application startup time automatically.
The Library's lifecycle therefore depends on the application lifecycle.
Due to the Lifecycle of Android Applications and the underlying timing, it is strongly advised not to call any Library Methods inside theonCreate
method.
When the activity is being launched (and hence the process gets created), the same applies to theonStart
andonResume
methods.
If you need to call any Library methods at application start in one of the above mentioned methods, you should use theCallback
Mechanism offered by theonLibraryReady
method instead.
For instance, instead of callingScannerLibrary.openScanner()
directly inonCreate
, use this code to postpone it to aCallback
appropriately:
ScannerLibrary.onLibraryReady(new LibraryCallback() { public void onLibraryReady() { ScannerLibrary.openScanner(); } });
Which can be simplified to:
ScannerLibrary.onLibraryReady(() -> { ScannerLibrary.openScanner(); });
Or even further to:
ScannerLibrary.onLibraryReady(ScannerLibrary::openScanner);
-
Method Summary
Modifier and Type Method Description static int
captureImage(byte[] buffer)
Capture the image.static int
closeScanner()
Close the barcode scanner.static int
deinitializeStream()
Deinitialization processing for streaming.static String
getAPIVersion()
Get the Scanner API version.static int
getCenteringWindow()
Get enable/disable of the centering window mode.static int
getDelimiter()
Get the delimiter for Package scan.static int
getDetectionAreaSize()
Get the size of barcode detection area for the centering window mode.static int
getImageDataSize()
Get the size of the data required for capturing image.static int
getInternalParameter(int tag)
Get internal parameters.static int
getInternalParameter(int[] tags, int[] values)
Get internal parameters.static int
getInverseMode()
Get the inverse barcode reading mode.static int
getLaserHighlightMode()
Get enable/disable of the laser highlight mode of 1D scanner.static int
getLaserSwingWidth()
Get the laser swing width of 1D scanner.static int
getLightMode()
Get the light mode.static String
getModuleVersion()
Get the Scanner module version.static int
getNotificationLED()
Get the behavior of the notification LED.static int
getNotificationSound()
Get the behavior of the notification sound.static int
getNotificationVibrator()
Get the behavior of the notification vibrator.static int
getNumberOfBarcodes()
Get the number of barcodes to be scanned in Multi-step scan or Package scan.static int
getOutputType()
Get the output type of the scan result.static int
getScannerAPO()
Get the Auto Power Off(APO) time of the barcode scanner.static int
getScanResult(ScanResult scanResult)
Get the last Scan Result.static int
getStreamDataSize()
Get the size of data required for streaming.static int
getStreamDataSize(Rect rectangle, int resolution)
Get the size of data required for streaming.static int
getSuffix()
Get the suffix type added at the end of the scan result.static int
getSymbologyCheckCount(int symbologyID)
Get the value of check count of the specified barcode.static int
getSymbologyEnable(int symbologyID)
Get reading enable/disable of the specified barcode.static int
getSymbologyMax(int symbologyID)
Get the reading maximum number of digits of the specified barcode.static int
getSymbologyMaxDefault(int symbologyID)
Get the default reading maximum number of digits of the specified barcode.static int
getSymbologyMin(int symbologyID)
Get the reading minimum number of digits of the specified barcode.static int
getSymbologyMinDefault(int symbologyID)
Get the default reading minimum number of digits of the specified barcode.static int
getSymbologyProperty(int symbologyID, int propertyNo)
Get the value of property setting of the specified barcode.static int
getTriggerKeyEnable()
Get the Trigger key enable/disable.static int
getTriggerKeyMode()
Get the Trigger key mode.static int
getTriggerKeyTimeout()
Get the Trigger key timeout.static int
initializeStream(Rect rectangle, int resolution)
Initialization processing for streaming.static boolean
isMethodSupported(String methodName)
static boolean
isMethodSupported(BigInteger method)
Check whether theMethod
indicated by theBigInteger
method parameter is supported on the currently active devicestatic boolean
isScannerOpen()
Check the barcode scanner is opened.static void
onLibraryReady(LibraryCallback callback)
Add a new Callback to the Queue of Callbacks to be processed once the Scanner becomes availablestatic int
openScanner()
Open the barcode scanner.static int
readStream(byte[] buffer)
Read the stream data.static int
setCenteringWindow(int centeringWindow)
Set enable/disable of the centering window mode.static int
setDefaultAll()
Return all barcode scanner settings to default.static int
setDelimiter(int delimiter)
Set the delimiter for Package scan.static int
setDetectionAreaSize(int detectionAreaSize)
Set the size of barcode detection area for the centering window mode.static int
setInternalParameter(byte[] command)
Set internal parameters.static int
setInternalParameter(int tag, int value)
Set internal parameters.static int
setInternalParameter(int number, int[] tags, int[] values)
Set internal parameters.static int
setInverseMode(int inverseMode)
Set the inverse barcode reading mode.static int
setLaserHighlightMode(int enable)
Set enable/disable of the laser highlight mode of 1D scanner.static int
setLaserSwingWidth(int laserSwingWidth)
Set the laser swing width of 1D scanner.static int
setLightMode(int lightMode)
Set the light mode.static int
setNotificationLED(int led)
Set the behavior of the notification LED.static int
setNotificationSound(int sound)
Set the behavior of the notification sound.static int
setNotificationVibrator(int vibrator)
Set the behavior of the notification vibrator.static int
setNumberOfBarcodes(int numberOfBarcodes)
Set the number of Barcodes to be scanned in Multi-step scan or Package scan.static int
setOutputType(int outputType)
Set the output type of the scan result.static int
setScannerAPO(int scannerAPOTime)
Set the Auto Power Off(APO) time of the barcode scanner.static int
setSuffix(int suffix)
Set the suffix type added at the end of the scan result.static int
setSymbologyCheckCount(int symbologyID, int checkCount)
Set the value of check count of the specified barcode.static int
setSymbologyEnable(int symbologyID, int enable)
Set reading enable/disable of the specified barcode.static int
setSymbologyMax(int symbologyID, int max)
Set the reading maximum number of digits of the specified barcode.static int
setSymbologyMin(int symbologyID, int min)
Set the reading minimum number of digits of the specified barcode.static int
setSymbologyProperty(int symbologyID, int propertyNo, int propertySetting)
Set the value of property setting of the specified barcode.static int
setTriggerKeyEnable(int triggerKeyEnable)
Set the Trigger key enable/disable.static int
setTriggerKeyMode(int triggerKeyMode)
Set the Trigger key mode.static int
setTriggerKeyOn(int triggerKeyOn)
Control the behavior of trigger key by software.static int
setTriggerKeyTimeout(int triggerKeyTimeout)
Set the Trigger key timeout.static int
startStream()
Start streaming.static int
stopStream()
Stop streaming.static int
turnAimerOn(int aimerOn)
Control the behavior of the aimer by software.static int
turnIlluminationOn(int illuminationOn)
Control the behavior of the illumination by software.
-
Method Details
-
isMethodSupported
Check whether theMethod
indicated by theBigInteger
method parameter is supported on the currently active device- Parameters:
method
-BigInteger
: Constant referencing the method to be checked- Returns:
boolean
:true
if the method is supported on the currently active device, otherwisefalse
- Throws:
IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
isMethodSupported
Check whether theMethod
indicated by theString
methodName parameter is supported on the currently active device- Parameters:
methodName
-String
: Name of the method to be checked- Returns:
boolean
:true
if the method is supported on the currently active device, otherwisefalse
- Throws:
IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
openScanner
Open the barcode scanner.- Returns:
int
:SUCCESS
: Success
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.- API Note:
- Call this function when the application starts.
If you call Scanner Library’s function before open the barcode scanner, it may not work correctly.
-
closeScanner
Close the barcode scanner.- Returns:
int
:SUCCESS
: Success
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.- API Note:
- Call this function when the application terminates.
-
isScannerOpen
public static boolean isScannerOpen() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionCheck the barcode scanner is opened.- Returns:
boolean
: true: The barcode scanner is opened
false: The barcode scanner is closed- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setDefaultAll
Return all barcode scanner settings to default.- Returns:
int
:SUCCESS
: Success
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getAPIVersion
public static String getAPIVersion() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the Scanner API version.- Returns:
String
: The API Version of the Scanner or Null in case of failure.- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
getModuleVersion
public static String getModuleVersion() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the Scanner module version.- Returns:
String
: The Module Version of the Scanner or Null in case of failure.- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
getScanResult
public static int getScanResult(ScanResult scanResult) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the last Scan Result.- Parameters:
scanResult
-ScanResult
: Specify theScanResult
class object to store the Scan Result.
For the member variable of the ScanReslt class, refer to theScanResult class
.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.- API Note:
- When you read multiple barcodes, you can get the final Scan Result.
When you fail scanning, you can get all of data are cleared except scan time.
When you call this function before scanning ever, you can get all of data are cleared.
For the default value, refer to theScanResult class
.
-
setNotificationLED
public static int setNotificationLED(int led) throws RemoteException, UnsupportedOperationExceptionSet the behavior of the notification LED.- Parameters:
led
-int
: The behavior of the notification LED
LED_OFF
: The notification LED not lights up in success and failure scanning.
LED_ON
: notification LED turns on GREEN in success scanning, and RED in failure scanning.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getNotificationLED
public static int getNotificationLED() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the behavior of the notification LED.- Returns:
int
:LED_OFF
: The notification LED not lights up in success and failure scanning.
LED_ON
: notification LED turns on GREEN in success scanning, and RED in failure scanning.
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setNotificationVibrator
public static int setNotificationVibrator(int vibrator) throws RemoteException, UnsupportedOperationExceptionSet the behavior of the notification vibrator.- Parameters:
vibrator
-int
: The behavior of the notification vibrator
VIBRATOR_ALL_OFF
: The notification vibrator does not vibrate in success and failure scanning.
VIBRATOR_FAIL_ON
: The notification vibrator vibrates in failure scanning.
VIBRATOR_SUCCESS_ON
: The notification vibrator vibrates in success scanning.
VIBRATOR_ALL_ON
: The notification vibrator vibrates in success and failure scanning.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getNotificationVibrator
public static int getNotificationVibrator() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the behavior of the notification vibrator.- Returns:
int
:VIBRATOR_ALL_OFF
: The notification vibrator does not vibrate in success and failure scanning. (default)
VIBRATOR_FAIL_ON
: The notification vibrator vibrates in failure scanning.
VIBRATOR_SUCCESS_ON
: The notification vibrator vibrates in success scanning.
VIBRATOR_ALL_ON
: The notification vibrator vibrates in success and failure scanning.
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setNotificationSound
public static int setNotificationSound(int sound) throws RemoteException, UnsupportedOperationExceptionSet the behavior of the notification sound.- Parameters:
sound
-int
: The behavior of the notification sound
SOUND_ALL_OFF
: The notification sound does not sounds in success and failure scanning.
SOUND_FAIL_ON
: The notification sound sounds in failure scanning.
SOUND_SUCCESS_ON
: The notification sound sounds in success scanning.
SOUND_ALL_ON
: The notification sound sounds in success and failure scanning.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getNotificationSound
public static int getNotificationSound() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the behavior of the notification sound.- Returns:
int
:SOUND_ALL_OFF
: The notification sound does not sounds in success and failure scanning.
SOUND_FAIL_ON
: The notification sound sounds in failure scanning.
SOUND_SUCCESS_ON
: The notification sound sounds in success scanning.
SOUND_ALL_ON
: The notification sound sounds in success and failure scanning. (default)
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setLightMode
public static int setLightMode(int lightMode) throws RemoteException, UnsupportedOperationExceptionSet the light mode.- Parameters:
lightMode
-int
: Light mode
ALL_OFF
: Illumination and Aimer does not light up
AIMER_ON
: Aimer lights up
ILLUMINATION_ON
: Illumination lights up
ALL_ON
: Illumination and Aimer lights up- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.- API Note:
- Set the action of Illumination and Aimer when you will scan, capture image, stream.
SpecifyALL_ON
when scanning.
If specify other parameters, reading performance decreased.
-
getLightMode
public static int getLightMode() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the light mode.- Returns:
int
:ALL_OFF
: Illumination and Aimer does not light up
AIMER_ON
: Aimer lights up
ILLUMINATION_ON
: Illumination lights up (default)
ALL_ON
: Illumination and Aimer lights up
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.- API Note:
- Get the action of Illumination and Aimer behavior when you will scan, capture image, stream.
-
turnAimerOn
Control the behavior of the aimer by software.- Parameters:
aimerOn
-int
: The behavior of the aimer
AIMER_OFF
: Aimer is turned off
AIMER_ON
: Aimer is turned on- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
turnIlluminationOn
public static int turnIlluminationOn(int illuminationOn) throws RemoteException, UnsupportedOperationExceptionControl the behavior of the illumination by software.- Parameters:
illuminationOn
-int
: The behavior of the illumination
ILLUMINATION_OFF
: Illumination is turned off
ILLUMINATION_ON
: Illumination is turned on- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getImageDataSize
public static int getImageDataSize() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the size of the data required for capturing image.- Returns:
int
: Return the data sizes for image capturing on success.
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
captureImage
public static int captureImage(byte[] buffer) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionCapture the image.- Parameters:
buffer
-byte[]
: Buffer to store image data.
Allocate the area necessary for storing image data.
For the detail, refer togetImageDataSize
.- Returns:
int
: Return the captured image data size on success.
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error
ERROR_NOTOPENED
: Not opened error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
getStreamDataSize
public static int getStreamDataSize() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the size of data required for streaming. Use this function if do not change the streaming area or resolution.- Returns:
int
: Return the data sizes for streaming on success.
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
getStreamDataSize
public static int getStreamDataSize(Rect rectangle, int resolution) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the size of data required for streaming. Use this function if change the streaming area or resolution.- Parameters:
rectangle
-Rect
: Streaming area.
Specify the resolution for streaming.
The origin is the upper left, the top and bottom specify 0-799, the left and right specify 0-1279. Specify the height and width of the area so that they are multiples of 2 when specifying 1/4 resolution and multiples of 4 when specifying 1/16 resolution.resolution
-int
: Resolution.
Specify the resolution for streaming.
FULL
: Full resolution
QUARTER
: 1/4 resolution
ONE_SIXTEENTH
: 1/16 resolution- Returns:
int
: Return the data sizes for streaming on success.
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
initializeStream
public static int initializeStream(Rect rectangle, int resolution) throws RemoteException, UnsupportedOperationExceptionInitialization processing for streaming. Use this function if change the streaming area or resolution.- Parameters:
rectangle
-Rect
: Streaming area.
Specify the resolution for streaming.
The origin is the upper left, the top and bottom specify 0-799, the left and right specify 0-1279. Specify the height and width of the area so that they are multiples of 2 when specifying 1/4 resolution and multiples of 4 when specifying 1/16 resolution.resolution
-int
: Resolution.
Specify the resolution for streaming.
FULL
: Full resolution
QUARTER
: 1/4 resolution
ONE_SIXTEENTH
: 1/16 resolution- Returns:
int
: Return the data sizes for streaming on success.
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
startStream
Start streaming.- Returns:
int
:SUCCESS
: Success
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
readStream
public static int readStream(byte[] buffer) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionRead the stream data.- Parameters:
buffer
-byte[]
: Buffer to store stream data.
Allocate the area necessary for storing stream data.
For the detail, refer togetStreamDataSize()
orgetStreamDataSize(Rect, int)
.- Returns:
int
: Return the acquired stream data sizes on success.
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.- API Note:
- To realize preview, call this function continuously.
-
stopStream
Stop streaming.- Returns:
int
:SUCCESS
: Success
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
deinitializeStream
Deinitialization processing for streaming. Use this function if changed the streaming area or resolution.- Returns:
int
:SUCCESS
: Success
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
setSymbologyEnable
public static int setSymbologyEnable(int symbologyID, int enable) throws RemoteException, UnsupportedOperationExceptionSet reading enable/disable of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.
WhenALL
is specified, all barcodes are enabled/disabled.enable
-int
: Reading enable/disableENABLE
: Read enable
DISABLE
: Read disable- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getSymbologyEnable
public static int getSymbologyEnable(int symbologyID) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet reading enable/disable of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.- Returns:
int
:ENABLE
: Read enable
DISABLE
: Read disable
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
getSymbologyMaxDefault
public static int getSymbologyMaxDefault(int symbologyID) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the default reading maximum number of digits of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.- Returns:
int
: Return default reading maximum number of digits on success.
If you specified the barcode that the number of digits can not be changed (i.e.EAN13
etc.), return 0.
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
getSymbologyMinDefault
public static int getSymbologyMinDefault(int symbologyID) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the default reading minimum number of digits of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.- Returns:
int
: Return default reading minimum number of digits on success.
If you specified the barcode that the number of digits can not be changed (i.e.EAN13
etc.), return 0.
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setSymbologyMax
public static int setSymbologyMax(int symbologyID, int max) throws RemoteException, UnsupportedOperationExceptionSet the reading maximum number of digits of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.
WhenALL
is specified, all barcodes are enabled/disabled.max
-int
: reading maximum number of digits.
For the number of digits that can be set, refer to Reading digits.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.- API Note:
- Barcodes larger than the set number of digits are not read.
-
getSymbologyMax
public static int getSymbologyMax(int symbologyID) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the reading maximum number of digits of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.- Returns:
int
: Return reading maximum number of digits on success.
If you specified the barcode that the number of digits can not be changed (i.e.EAN13
etc.), return 0.
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setSymbologyMin
public static int setSymbologyMin(int symbologyID, int min) throws RemoteException, UnsupportedOperationExceptionSet the reading minimum number of digits of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.
WhenALL
is specified, all barcodes are enabled/disabled.min
-int
: reading minimum number of digits.
For the number of digits that can be set, refer to Reading digits.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.- API Note:
- Barcodes less than the set number of digits are not read.
-
getSymbologyMin
public static int getSymbologyMin(int symbologyID) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the reading minimum number of digits of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.- Returns:
int
: Return reading minimum number of digits on success.
If you specified the barcode that the number of digits can not be changed (i.e.EAN13
etc.), return 0.
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setSymbologyCheckCount
public static int setSymbologyCheckCount(int symbologyID, int checkCount) throws RemoteException, UnsupportedOperationExceptionSet the value of check count of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.
The barcodes that can be set to the number of check count on IT-G600 areCodabar
Codabar,Code 128
,Code 39
,PDF 417
,QR
.checkCount
-int
: Check count
Specify the check count between 0 and 10. If you specified 0, do not match the result.
Increasing the number of check count has the effect of reducing the misreading rate.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getSymbologyCheckCount
public static int getSymbologyCheckCount(int symbologyID) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the value of check count of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.- Returns:
int
: Return the value of check count on success.
The barcodes that can be set to the number of check count on IT-G600 areCodabar
Codabar,Code 128
,Code 39
,PDF 417
,QR
. If you specified the barcode where the number of check count can not be changed (i.e.EAN13
etc.), return 0.
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setSymbologyProperty
public static int setSymbologyProperty(int symbologyID, int propertyNo, int propertySetting) throws RemoteException, UnsupportedOperationExceptionSet the value of property setting of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.propertyNo
-int
: Property number
Specify the property number.
For the property number, refer to Property of barcode.propertySetting
-int
: Setting value for property
Set the property setting value.
For the property number, refer to Property of barcode.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.- API Note:
- Specify property number and set value to change.
-
getSymbologyProperty
public static int getSymbologyProperty(int symbologyID, int propertyNo) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the value of property setting of the specified barcode.- Parameters:
symbologyID
-int
: Specify the SymbologyID of each barcode.
For the SymbologyID of each barcode, refer to the Code identification table.propertyNo
-int
: Property number
Specify the property number.
For the property number, refer to Property of barcode.- Returns:
int
: Return the value of property setting on success.ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.- API Note:
- Specify property number and set value to change.
-
setOutputType
public static int setOutputType(int outputType) throws RemoteException, UnsupportedOperationExceptionSet the output type of the scan result.- Parameters:
outputType
-int
: The output type of the scan result
CLIP
: Clipboard output
KEY
: Keyboard output
USER
: User message output
BROADCAST
: Broadcast output- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.- API Note:
- Intent issued when user message output setting is enabled is "device.common.USERMSG".
Intent issued when broadcast output setting is enabled is "casio.intent.action.BROADCAST". To receive the intent, install the IntentManager.
For detail of the intent refer to Output type control.
-
getOutputType
public static int getOutputType() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the output type of the scan result.- Returns:
int
:CLIP
: Clipboard output
KEY
: Keyboard output
USER
: User message output
BROADCAST
: Broadcast outputERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setSuffix
Set the suffix type added at the end of the scan result.- Parameters:
suffix
-int
: Suffix to be added.
NONE
: no suffix
LF
: LF (0x0A)
TAB
: TAB (0x09)
TAB_LF
: TAB+LF (0x09, 0x0A)- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getSuffix
public static int getSuffix() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the suffix type added at the end of the scan result.- Returns:
int
:NONE
: no suffix
LF
: LF (0x0A)
TAB
: TAB (0x09)
TAB_LF
: TAB+LF (0x09, 0x0A)ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setInverseMode
public static int setInverseMode(int inverseMode) throws RemoteException, UnsupportedOperationExceptionSet the inverse barcode reading mode.- Parameters:
inverseMode
-int
: Inverse barcode reading mode.
DISABLE
: Only Normal barcode can read
ENABLE
: Only Inverse barcode can read
AUTO
: Normal and Inverse barcode can read- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getInverseMode
public static int getInverseMode() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the inverse barcode reading mode.- Returns:
int
:DISABLE
: Only Normal barcode can read (default)
ENABLE
: Only Inverse barcode can read
AUTO
: Normal and Inverse barcode can readERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setTriggerKeyEnable
public static int setTriggerKeyEnable(int triggerKeyEnable) throws RemoteException, UnsupportedOperationExceptionSet the Trigger key enable/disable.- Parameters:
triggerKeyEnable
-int
: Trigger key enable/disable.
DISABLE
: Trigger key disable
ENABLE
: Trigger key enable- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getTriggerKeyEnable
public static int getTriggerKeyEnable() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the Trigger key enable/disable.- Returns:
int
:DISABLE
: Trigger key disable
ENABLE
: Trigger key enable (default)
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setTriggerKeyMode
public static int setTriggerKeyMode(int triggerKeyMode) throws RemoteException, UnsupportedOperationExceptionSet the Trigger key mode.- Parameters:
triggerKeyMode
-int
: Trigger key enable/disable.
NORMAL
: Normal Scan
CONTINUOUS
: Continuous reading
MULTI_STEP
: Multi-step reading
PACKAGE
: Package reading
This setting returns to the default after rebooting. To use this setting, please set it when starting the application.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getTriggerKeyMode
public static int getTriggerKeyMode() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the Trigger key mode.- Returns:
int
:NORMAL
: Normal Scan (default)
CONTINUOUS
: Continuous reading
MULTI_STEP
: Multi-step reading
PACKAGE
: Package reading
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setNumberOfBarcodes
public static int setNumberOfBarcodes(int numberOfBarcodes) throws RemoteException, UnsupportedOperationExceptionSet the number of Barcodes to be scanned in Multi-step scan or Package scan.- Parameters:
numberOfBarcodes
-int
: The number of Barcodes to be scanned in Multi-step scan or Package scan.
Specify a value between 2 and 10.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getNumberOfBarcodes
public static int getNumberOfBarcodes() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the number of barcodes to be scanned in Multi-step scan or Package scan.- Returns:
int
: Return the number of barcodes to be scanned in Multi-step scan or Package scan. Default value is 4.
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setDelimiter
public static int setDelimiter(int delimiter) throws RemoteException, UnsupportedOperationExceptionSet the delimiter for Package scan.- Parameters:
delimiter
-int
: The delimiter for Package scan.
Specify a value between 0x00 and 0x7f as ASCII.
When 0x00 is set, it operates None (No delimiter).- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getDelimiter
public static int getDelimiter() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the delimiter for Package scan.- Returns:
int
: Return the delimiter as ASCII for Package scan. Default value is "US(0x1f)".
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setTriggerKeyTimeout
public static int setTriggerKeyTimeout(int triggerKeyTimeout) throws RemoteException, UnsupportedOperationExceptionSet the Trigger key timeout.- Parameters:
triggerKeyTimeout
-int
: Trigger timeout
Specify a value in milliseconds.
The setting range is 1000 to 10000.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getTriggerKeyTimeout
public static int getTriggerKeyTimeout() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the Trigger key timeout.- Returns:
int
: Return the value of Trigger key timeout on success.
Default value is 10000.
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setTriggerKeyOn
public static int setTriggerKeyOn(int triggerKeyOn) throws RemoteException, UnsupportedOperationExceptionControl the behavior of trigger key by software.- Parameters:
triggerKeyOn
-int
: Status of trigger key
TRIGGER_OFF
: Trigger key is released virtually
TRIGGER_ON
: Trigger key is pressed virtually- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
setScannerAPO
public static int setScannerAPO(int scannerAPOTime) throws RemoteException, UnsupportedOperationExceptionSet the Auto Power Off(APO) time of the barcode scanner.- Parameters:
scannerAPOTime
-int
: The APO time of the barcode scanner.
Specify a value between 0 and 65535 in seconds.
When set to 0, APO is disabled.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getScannerAPO
public static int getScannerAPO() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the Auto Power Off(APO) time of the barcode scanner.- Returns:
int
: Return the APO time of barcode scanner. Default value is 60.
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setCenteringWindow
public static int setCenteringWindow(int centeringWindow) throws RemoteException, UnsupportedOperationExceptionSet enable/disable of the centering window mode.- Parameters:
centeringWindow
-int
: Enable/disable of the centering window mode.
DISABLE
: Centering window mode disable
ENABLE
: Centering window mode enable- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.- API Note:
- Refer to the figure below for the barcode that can be read while the center reading mode is in effect. If part of the barcode is included in the detection area, read the barcode.
-
getCenteringWindow
public static int getCenteringWindow() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet enable/disable of the centering window mode.- Returns:
int
:DISABLE
: Centering window mode disable (default)
ENABLE
: Centering window mode enable
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setDetectionAreaSize
public static int setDetectionAreaSize(int detectionAreaSize) throws RemoteException, UnsupportedOperationExceptionSet the size of barcode detection area for the centering window mode.- Parameters:
detectionAreaSize
-int
: The size of barcode detection area for the centering window mode.
Specify a value between 0 and 10.
If you set smaller value, the barcode near the center is detected.
If you specified 0, the center point becomes the detection area.
Please change the value according to the actual use environment.- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.- API Note:
- Refer to the figure below for the detection area size guide:
-
getDetectionAreaSize
public static int getDetectionAreaSize() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the size of barcode detection area for the centering window mode.- Returns:
int
: Return the size of barcode detection area for the centering window mode.
Default value is 5.
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setLaserSwingWidth
public static int setLaserSwingWidth(int laserSwingWidth) throws RemoteException, UnsupportedOperationExceptionSet the laser swing width of 1D scanner.- Parameters:
laserSwingWidth
-int
: Swing width
MAX
: Swing width MAX
WIDE
: Swing width WIDE
MIDDLE
: Swing width MIDDLE
NARROW
: Swing width NARROW- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getLaserSwingWidth
public static int getLaserSwingWidth() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet the laser swing width of 1D scanner.- Returns:
int
:MAX
: Swing width MAX (default)
WIDE
: Swing width WIDE
MIDDLE
: Swing width MIDDLE
NARROW
: Swing width NARROWERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
setLaserHighlightMode
public static int setLaserHighlightMode(int enable) throws RemoteException, UnsupportedOperationExceptionSet enable/disable of the laser highlight mode of 1D scanner.- Parameters:
enable
-int
: Enable/disable of the laser highlight mode
DISABLE
: Laser highlight mode disable
ENABLE
: Laser highlight mode enable- Returns:
int
:SUCCESS
: Success
ERROR_PARAMETER
: Parameter error
ERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getLaserHighlightMode
public static int getLaserHighlightMode() throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet enable/disable of the laser highlight mode of 1D scanner.- Returns:
int
:DISABLE
: Laser highlight mode disable (default)
ENABLE
: Laser highlight mode enableERROR_UNSUPPORTED
: Unsupported error- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.- API Note:
- When highlight mode is enabled, the barcode read is emphasized. It is useful for checking the barcode read when two or more barcodes are placed nearby.
-
setInternalParameter
public static int setInternalParameter(byte[] command) throws RemoteException, UnsupportedOperationExceptionSet internal parameters. Detailed specifications are not disclosed.- Parameters:
command
-byte[]
- Returns:
int
- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
setInternalParameter
public static int setInternalParameter(int tag, int value) throws RemoteException, UnsupportedOperationExceptionSet internal parameters. Detailed specifications are not disclosed.- Parameters:
tag
-int
value
-int
- Returns:
int
- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
setInternalParameter
public static int setInternalParameter(int number, int[] tags, int[] values) throws RemoteException, UnsupportedOperationExceptionSet internal parameters. Detailed specifications are not disclosed.- Parameters:
number
-int
tags
-int[]
values
-int[]
- Returns:
int
- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-
getInternalParameter
public static int getInternalParameter(int tag) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet internal parameters. Detailed specifications are not disclosed.- Parameters:
tag
-int
- Returns:
int
- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
- Gets thrown when the Library is not ready yet to accept method calls.
In such case, please useonLibraryReady
Method to add acallback
which then processes this method. See API Notes ofthis class
for further details.
-
getInternalParameter
public static int getInternalParameter(int[] tags, int[] values) throws RemoteException, UnsupportedOperationException, IllegalStateExceptionGet internal parameters. Detailed specifications are not disclosed.- Parameters:
tags
-int[]
values
-int[]
- Returns:
int
- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.IllegalStateException
-
onLibraryReady
public static void onLibraryReady(LibraryCallback callback) throws RemoteException, UnsupportedOperationExceptionAdd a new Callback to the Queue of Callbacks to be processed once the Scanner becomes available- Parameters:
callback
-LibraryCallback
: Instance of theLibraryCallback
Interface which holds theonLibraryReady()
Method which will get called once the regarding library becomes available- Throws:
RemoteException
- Gets thrown when access to the system service fails.UnsupportedOperationException
- Gets thrown when the current device does not support this method.
-