public class BarCodeReader.Parameters
extends java.lang.Object
To make reader parameters take effect, applications have to call
BarCodeReader.setParameters(BarCodeReader.Parameters)
. For example, after
setWhiteBalance(java.lang.String)
is called, white balance is not
actually changed until BarCodeReader.setParameters(BarCodeReader.Parameters)
is called with the changed parameters object.
Different devices may have different reader capabilities, such as
picture size or flash modes. The application should query the reader
capabilities before setting parameters. For example, the application
should call getSupportedColorEffects()
before
calling setColorEffect(String)
. If the
reader does not support color effects,
getSupportedColorEffects()
will return null.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANTIBANDING_50HZ |
static java.lang.String |
ANTIBANDING_60HZ |
static java.lang.String |
ANTIBANDING_AUTO |
static java.lang.String |
ANTIBANDING_OFF |
static java.lang.String |
EFFECT_AQUA |
static java.lang.String |
EFFECT_BLACKBOARD |
static java.lang.String |
EFFECT_MONO |
static java.lang.String |
EFFECT_NEGATIVE |
static java.lang.String |
EFFECT_NONE |
static java.lang.String |
EFFECT_POSTERIZE |
static java.lang.String |
EFFECT_SEPIA |
static java.lang.String |
EFFECT_SOLARIZE |
static java.lang.String |
EFFECT_WHITEBOARD |
static java.lang.String |
FLASH_MODE_AUTO
Flash will be fired automatically when required.
|
static java.lang.String |
FLASH_MODE_OFF
Flash will not be fired.
|
static java.lang.String |
FLASH_MODE_ON
Flash will always be fired during snapshot.
|
static java.lang.String |
FLASH_MODE_RED_EYE
Flash will be fired in red-eye reduction mode.
|
static java.lang.String |
FLASH_MODE_TORCH
Constant emission of light during preview, auto-focus and snapshot.
|
static int |
FOCUS_DISTANCE_FAR_INDEX
The array index of far focus distance for use with
getFocusDistances(float[]) . |
static int |
FOCUS_DISTANCE_NEAR_INDEX
The array index of near focus distance for use with
getFocusDistances(float[]) . |
static int |
FOCUS_DISTANCE_OPTIMAL_INDEX
The array index of optimal focus distance for use with
getFocusDistances(float[]) . |
static java.lang.String |
FOCUS_MODE_AUTO
Auto-focus mode.
|
static java.lang.String |
FOCUS_MODE_CONTINUOUS_VIDEO
Continuous auto focus mode intended for video recording.
|
static java.lang.String |
FOCUS_MODE_EDOF
Extended depth of field (EDOF).
|
static java.lang.String |
FOCUS_MODE_FIXED
Focus is fixed.
|
static java.lang.String |
FOCUS_MODE_INFINITY
Focus is set at infinity.
|
static java.lang.String |
FOCUS_MODE_MACRO
Macro (close-up) focus mode.
|
static int |
PREVIEW_FPS_MAX_INDEX
The array index of maximum preview fps for use with
getPreviewFpsRange(int[]) or getSupportedPreviewFpsRange() . |
static int |
PREVIEW_FPS_MIN_INDEX
The array index of minimum preview fps for use with
getPreviewFpsRange(int[]) or getSupportedPreviewFpsRange() . |
static java.lang.String |
SCENE_MODE_ACTION
Take photos of fast moving objects.
|
static java.lang.String |
SCENE_MODE_AUTO
Scene mode is off.
|
static java.lang.String |
SCENE_MODE_BARCODE
Applications are looking for a barcode.
|
static java.lang.String |
SCENE_MODE_BEACH
Take pictures on the beach.
|
static java.lang.String |
SCENE_MODE_CANDLELIGHT
Capture the naturally warm color of scenes lit by candles.
|
static java.lang.String |
SCENE_MODE_FIREWORKS
For shooting firework displays.
|
static java.lang.String |
SCENE_MODE_LANDSCAPE
Take pictures on distant objects.
|
static java.lang.String |
SCENE_MODE_NIGHT
Take photos at night.
|
static java.lang.String |
SCENE_MODE_NIGHT_PORTRAIT
Take people pictures at night.
|
static java.lang.String |
SCENE_MODE_PARTY
Take indoor low-light shot.
|
static java.lang.String |
SCENE_MODE_PORTRAIT
Take people pictures.
|
static java.lang.String |
SCENE_MODE_SNOW
Take pictures on the snow.
|
static java.lang.String |
SCENE_MODE_SPORTS
Take photos of fast moving objects.
|
static java.lang.String |
SCENE_MODE_STEADYPHOTO
Avoid blurry pictures (for example, due to hand shake).
|
static java.lang.String |
SCENE_MODE_SUNSET
Take sunset photos.
|
static java.lang.String |
SCENE_MODE_THEATRE
Take photos in a theater.
|
static java.lang.String |
WHITE_BALANCE_AUTO |
static java.lang.String |
WHITE_BALANCE_CLOUDY_DAYLIGHT |
static java.lang.String |
WHITE_BALANCE_DAYLIGHT |
static java.lang.String |
WHITE_BALANCE_FLUORESCENT |
static java.lang.String |
WHITE_BALANCE_INCANDESCENT |
static java.lang.String |
WHITE_BALANCE_SHADE |
static java.lang.String |
WHITE_BALANCE_TWILIGHT |
static java.lang.String |
WHITE_BALANCE_WARM_FLUORESCENT |
Modifier and Type | Method and Description |
---|---|
void |
dump()
Deprecated.
|
java.lang.String |
flatten()
Creates a single string with all the parameters set in
this Parameters object.
|
java.lang.String |
get(java.lang.String key)
Returns the value of a String parameter.
|
java.lang.String |
getAntibanding()
Gets the current antibanding setting.
|
java.lang.String |
getColorEffect()
Gets the current color effect setting.
|
int |
getExposureCompensation()
Gets the current exposure compensation index.
|
float |
getExposureCompensationStep()
Gets the exposure compensation step.
|
java.lang.String |
getFlashMode()
Gets the current flash mode setting.
|
float |
getFocalLength()
Gets the focal length (in millimeter) of the reader.
|
void |
getFocusDistances(float[] output)
Gets the distances from the reader to where an object appears to be
in focus.
|
java.lang.String |
getFocusMode()
Gets the current focus mode setting.
|
float |
getHorizontalViewAngle()
Gets the horizontal angle of view in degrees.
|
int |
getInt(java.lang.String key)
Returns the value of an integer parameter.
|
int |
getJpegQuality()
Returns the quality setting for the JPEG picture.
|
int |
getJpegThumbnailQuality()
Returns the quality setting for the EXIF thumbnail in Jpeg picture.
|
BarCodeReader.Size |
getJpegThumbnailSize()
Returns the dimensions for EXIF thumbnail in Jpeg picture.
|
int |
getMaxExposureCompensation()
Gets the maximum exposure compensation index.
|
int |
getMaxZoom()
Gets the maximum zoom value allowed for snapshot.
|
int |
getMinExposureCompensation()
Gets the minimum exposure compensation index.
|
int |
getPictureFormat()
Returns the image format for pictures.
|
BarCodeReader.Size |
getPictureSize()
Returns the dimension setting for pictures.
|
int |
getPreviewFormat()
Returns the image format for preview frames got from
BarCodeReader.PreviewCallback . |
void |
getPreviewFpsRange(int[] range)
Returns the current minimum and maximum preview fps.
|
int |
getPreviewFrameRate()
Deprecated.
replaced by
getPreviewFpsRange(int[]) |
BarCodeReader.Size |
getPreviewSize()
Returns the dimensions setting for preview pictures.
|
java.lang.String |
getSceneMode()
Gets the current scene mode setting.
|
java.util.List<java.lang.String> |
getSupportedAntibanding()
Gets the supported antibanding values.
|
java.util.List<java.lang.String> |
getSupportedColorEffects()
Gets the supported color effects.
|
java.util.List<java.lang.String> |
getSupportedFlashModes()
Gets the supported flash modes.
|
java.util.List<java.lang.String> |
getSupportedFocusModes()
Gets the supported focus modes.
|
java.util.List<BarCodeReader.Size> |
getSupportedJpegThumbnailSizes()
Gets the supported jpeg thumbnail sizes.
|
java.util.List<java.lang.Integer> |
getSupportedPictureFormats()
Gets the supported picture formats.
|
java.util.List<BarCodeReader.Size> |
getSupportedPictureSizes()
Gets the supported picture sizes.
|
java.util.List<java.lang.Integer> |
getSupportedPreviewFormats()
Gets the supported preview formats.
|
java.util.List<int[]> |
getSupportedPreviewFpsRange()
Gets the supported preview fps (frame-per-second) ranges.
|
java.util.List<java.lang.Integer> |
getSupportedPreviewFrameRates()
Deprecated.
replaced by
getSupportedPreviewFpsRange() |
java.util.List<BarCodeReader.Size> |
getSupportedPreviewSizes()
Gets the supported preview sizes.
|
java.util.List<java.lang.String> |
getSupportedSceneModes()
Gets the supported scene modes.
|
java.util.List<java.lang.String> |
getSupportedWhiteBalance()
Gets the supported white balance.
|
float |
getVerticalViewAngle()
Gets the vertical angle of view in degrees.
|
java.lang.String |
getWhiteBalance()
Gets the current white balance setting.
|
int |
getZoom()
Gets current zoom value.
|
java.util.List<java.lang.Integer> |
getZoomRatios()
Gets the zoom ratios of all zoom values.
|
boolean |
isSmoothZoomSupported()
Returns true if smooth zoom is supported.
|
boolean |
isZoomSupported()
Returns true if zoom is supported.
|
void |
remove(java.lang.String key) |
void |
removeGpsData()
Removes GPS latitude, longitude, altitude, and timestamp from the
parameters.
|
void |
set(java.lang.String key,
int value)
Sets an integer parameter.
|
void |
set(java.lang.String key,
java.lang.String value)
Sets a String parameter.
|
void |
setAntibanding(java.lang.String antibanding)
Sets the antibanding.
|
void |
setColorEffect(java.lang.String value)
Sets the current color effect setting.
|
void |
setExposureCompensation(int value)
Sets the exposure compensation index.
|
void |
setFlashMode(java.lang.String value)
Sets the flash mode.
|
void |
setFocusMode(java.lang.String value)
Sets the focus mode.
|
void |
setGpsAltitude(double altitude)
Sets GPS altitude.
|
void |
setGpsLatitude(double latitude)
Sets GPS latitude coordinate.
|
void |
setGpsLongitude(double longitude)
Sets GPS longitude coordinate.
|
void |
setGpsProcessingMethod(java.lang.String processing_method)
Sets GPS processing method.
|
void |
setGpsTimestamp(long timestamp)
Sets GPS timestamp.
|
void |
setJpegQuality(int quality)
Sets Jpeg quality of captured picture.
|
void |
setJpegThumbnailQuality(int quality)
Sets the quality of the EXIF thumbnail in Jpeg picture.
|
void |
setJpegThumbnailSize(int width,
int height)
Sets the dimensions for EXIF thumbnail in Jpeg picture.
|
void |
setPictureFormat(int pixel_format)
Sets the image format for pictures.
|
void |
setPictureSize(int width,
int height)
Sets the dimensions for pictures.
|
void |
setPreviewFormat(int pixel_format)
Sets the image format for preview pictures.
|
void |
setPreviewFpsRange(int min,
int max)
Sets the maximum and maximum preview fps.
|
void |
setPreviewFrameRate(int fps)
Deprecated.
replaced by
setPreviewFpsRange(int,int) |
void |
setPreviewSize(int width,
int height)
Sets the dimensions for preview pictures.
|
void |
setRotation(int rotation)
Sets the rotation angle in degrees relative to the orientation of
the reader.
|
void |
setSceneMode(java.lang.String value)
Sets the scene mode.
|
void |
setWhiteBalance(java.lang.String value)
Sets the white balance.
|
void |
setZoom(int value)
Sets current zoom value.
|
void |
unflatten(java.lang.String flattened)
Takes a flattened string of parameters and adds each one to
this Parameters object.
|
public static final java.lang.String WHITE_BALANCE_AUTO
public static final java.lang.String WHITE_BALANCE_INCANDESCENT
public static final java.lang.String WHITE_BALANCE_FLUORESCENT
public static final java.lang.String WHITE_BALANCE_WARM_FLUORESCENT
public static final java.lang.String WHITE_BALANCE_DAYLIGHT
public static final java.lang.String WHITE_BALANCE_CLOUDY_DAYLIGHT
public static final java.lang.String WHITE_BALANCE_TWILIGHT
public static final java.lang.String WHITE_BALANCE_SHADE
public static final java.lang.String EFFECT_NONE
public static final java.lang.String EFFECT_MONO
public static final java.lang.String EFFECT_NEGATIVE
public static final java.lang.String EFFECT_SOLARIZE
public static final java.lang.String EFFECT_SEPIA
public static final java.lang.String EFFECT_POSTERIZE
public static final java.lang.String EFFECT_WHITEBOARD
public static final java.lang.String EFFECT_BLACKBOARD
public static final java.lang.String EFFECT_AQUA
public static final java.lang.String ANTIBANDING_AUTO
public static final java.lang.String ANTIBANDING_50HZ
public static final java.lang.String ANTIBANDING_60HZ
public static final java.lang.String ANTIBANDING_OFF
public static final java.lang.String FLASH_MODE_OFF
public static final java.lang.String FLASH_MODE_AUTO
public static final java.lang.String FLASH_MODE_ON
public static final java.lang.String FLASH_MODE_RED_EYE
public static final java.lang.String FLASH_MODE_TORCH
public static final java.lang.String SCENE_MODE_AUTO
public static final java.lang.String SCENE_MODE_ACTION
SCENE_MODE_SPORTS
.public static final java.lang.String SCENE_MODE_PORTRAIT
public static final java.lang.String SCENE_MODE_LANDSCAPE
public static final java.lang.String SCENE_MODE_NIGHT
public static final java.lang.String SCENE_MODE_NIGHT_PORTRAIT
public static final java.lang.String SCENE_MODE_THEATRE
public static final java.lang.String SCENE_MODE_BEACH
public static final java.lang.String SCENE_MODE_SNOW
public static final java.lang.String SCENE_MODE_SUNSET
public static final java.lang.String SCENE_MODE_STEADYPHOTO
public static final java.lang.String SCENE_MODE_FIREWORKS
public static final java.lang.String SCENE_MODE_SPORTS
SCENE_MODE_ACTION
.public static final java.lang.String SCENE_MODE_PARTY
public static final java.lang.String SCENE_MODE_CANDLELIGHT
public static final java.lang.String SCENE_MODE_BARCODE
public static final java.lang.String FOCUS_MODE_AUTO
BarCodeReader.autoFocus(AutoFocusCallback)
to start the focus in this mode.public static final java.lang.String FOCUS_MODE_INFINITY
BarCodeReader.autoFocus(AutoFocusCallback)
in this mode.public static final java.lang.String FOCUS_MODE_MACRO
BarCodeReader.autoFocus(AutoFocusCallback)
to start the focus in this
mode.public static final java.lang.String FOCUS_MODE_FIXED
BarCodeReader.autoFocus(AutoFocusCallback)
in this mode.public static final java.lang.String FOCUS_MODE_EDOF
BarCodeReader.autoFocus(AutoFocusCallback)
in this mode.public static final java.lang.String FOCUS_MODE_CONTINUOUS_VIDEO
BarCodeReader.autoFocus(AutoFocusCallback)
in this mode.
To stop continuous focus, applications should change the focus mode
to other modes.public static final int FOCUS_DISTANCE_NEAR_INDEX
getFocusDistances(float[])
.public static final int FOCUS_DISTANCE_OPTIMAL_INDEX
getFocusDistances(float[])
.public static final int FOCUS_DISTANCE_FAR_INDEX
getFocusDistances(float[])
.public static final int PREVIEW_FPS_MIN_INDEX
getPreviewFpsRange(int[])
or getSupportedPreviewFpsRange()
.public static final int PREVIEW_FPS_MAX_INDEX
getPreviewFpsRange(int[])
or getSupportedPreviewFpsRange()
.public void dump()
public java.lang.String flatten()
The unflatten(String)
method does the reverse.
public void unflatten(java.lang.String flattened)
The flatten()
method does the reverse.
flattened
- a String of parameters (key-value paired) that
are semi-colon delimitedpublic void remove(java.lang.String key)
public void set(java.lang.String key, java.lang.String value)
key
- the key name for the parametervalue
- the String value of the parameterpublic void set(java.lang.String key, int value)
key
- the key name for the parametervalue
- the int value of the parameterpublic java.lang.String get(java.lang.String key)
key
- the key name for the parameterpublic int getInt(java.lang.String key)
key
- the key name for the parameterpublic void setPreviewSize(int width, int height)
width
- the width of the pictures, in pixelsheight
- the height of the pictures, in pixelsBarCodeReader.setDisplayOrientation(int)
,
BarCodeReader.getReaderInfo(int, ReaderInfo)
,
setPictureSize(int, int)
,
setJpegThumbnailSize(int, int)
public BarCodeReader.Size getPreviewSize()
public java.util.List<BarCodeReader.Size> getSupportedPreviewSizes()
public void setJpegThumbnailSize(int width, int height)
setPreviewSize(int,int)
for reference.width
- the width of the thumbnail, in pixelsheight
- the height of the thumbnail, in pixelssetPreviewSize(int,int)
public BarCodeReader.Size getJpegThumbnailSize()
public java.util.List<BarCodeReader.Size> getSupportedJpegThumbnailSizes()
public void setJpegThumbnailQuality(int quality)
quality
- the JPEG quality of the EXIF thumbnail. The range is 1
to 100, with 100 being the best.public int getJpegThumbnailQuality()
public void setJpegQuality(int quality)
quality
- the JPEG quality of captured picture. The range is 1
to 100, with 100 being the best.public int getJpegQuality()
@Deprecated public void setPreviewFrameRate(int fps)
setPreviewFpsRange(int,int)
fps
- the frame rate (frames per second)@Deprecated public int getPreviewFrameRate()
getPreviewFpsRange(int[])
@Deprecated public java.util.List<java.lang.Integer> getSupportedPreviewFrameRates()
getSupportedPreviewFpsRange()
public void setPreviewFpsRange(int min, int max)
BarCodeReader.PreviewCallback
. The minimum and
maximum preview fps must be one of the elements from getSupportedPreviewFpsRange()
.min
- the minimum preview fps (scaled by 1000).max
- the maximum preview fps (scaled by 1000).java.lang.RuntimeException
- if fps range is invalid.BarCodeReader.setPreviewCallbackWithBuffer(BarCodeReader.PreviewCallback)
,
getSupportedPreviewFpsRange()
public void getPreviewFpsRange(int[] range)
getSupportedPreviewFpsRange()
.public java.util.List<int[]> getSupportedPreviewFpsRange()
PREVIEW_FPS_MIN_INDEX
,
PREVIEW_FPS_MAX_INDEX
public void setPreviewFormat(int pixel_format)
If this is never called, the default format will be
android.graphics.ImageFormat#NV21
, which
uses the NV21 encoding format.
pixel_format
- the desired preview picture format, defined
by one of the android.graphics.ImageFormat
constants.
(E.g., ImageFormat.NV21 (default),
ImageFormat.RGB_565, or
ImageFormat.JPEG)android.graphics.ImageFormat
public int getPreviewFormat()
BarCodeReader.PreviewCallback
.android.graphics.ImageFormat
public java.util.List<java.lang.Integer> getSupportedPreviewFormats()
android.graphics.ImageFormat
public void setPictureSize(int width, int height)
setPreviewSize(int,int)
for reference.width
- the width for pictures, in pixelsheight
- the height for pictures, in pixelssetPreviewSize(int,int)
public BarCodeReader.Size getPictureSize()
public java.util.List<BarCodeReader.Size> getSupportedPictureSizes()
public void setPictureFormat(int pixel_format)
pixel_format
- the desired picture format
(ImageFormat.NV21,
ImageFormat.RGB_565, or
ImageFormat.JPEG)android.graphics.ImageFormat
public int getPictureFormat()
android.graphics.ImageFormat
public java.util.List<java.lang.Integer> getSupportedPictureFormats()
android.graphics.ImageFormat
public void setRotation(int rotation)
BarCodeReader.PictureCallback
. The reader driver may set orientation in the
EXIF header without rotating the picture. Or the driver may rotate
the picture and the EXIF thumbnail. If the Jpeg picture is rotated,
the orientation in the EXIF header will be missing or 1 (row #0 is
top and column #0 is left side).
If applications want to rotate the picture to match the orientation
of what users see, apps should use android.view.OrientationEventListener
and BarCodeReader.ReaderInfo
.
The value from OrientationEventListener is relative to the natural
orientation of the device. ReaderInfo.orientation is the angle
between reader orientation and natural device orientation. The sum
of the two is the rotation angle for back-facing reader. The
difference of the two is the rotation angle for front-facing reader.
Note that the JPEG pictures of front-facing readers are not mirrored
as in preview display.
For example, suppose the natural orientation of the device is portrait. The device is rotated 270 degrees clockwise, so the device orientation is 270. Suppose a back-facing reader sensor is mounted in landscape and the top side of the reader sensor is aligned with the right edge of the display in natural orientation. So the reader orientation is 90. The rotation should be set to 0 (270 + 90).
The reference code is as follows.
#import com.zebra.adc.decoder; public void public void onOrientationChanged(int orientation) { int rotation = 0; if ( orientation == ORIENTATION_UNKNOWN ) return; BarCodeReader.ReaderInfo info = new BarCodeReader.ReaderInfo(); BarCodeReader.getReaderInfo(readerId, info); orientation = (orientation + 45) / 90 * 90; if ( info.facing == BarCodeReader.ReaderInfo.BCRDR_FACING_FRONT ) { rotation = (info.orientation - orientation + 360) % 360; } else { // back-facing reader rotation = (info.orientation + orientation) % 360; } mParameters.setRotation(rotation); }
rotation
- The rotation angle in degrees relative to the
orientation of the reader. Rotation can only be 0,
90, 180 or 270.java.lang.IllegalArgumentException
- if rotation value is invalid.android.view.OrientationEventListener
,
BarCodeReader.getReaderInfo(int, BarCodeReader.ReaderInfo)
public void setGpsLatitude(double latitude)
latitude
- GPS latitude coordinate.public void setGpsLongitude(double longitude)
longitude
- GPS longitude coordinate.public void setGpsAltitude(double altitude)
altitude
- GPS altitude in meters.public void setGpsTimestamp(long timestamp)
timestamp
- GPS timestamp (UTC in seconds since January 1,
1970).public void setGpsProcessingMethod(java.lang.String processing_method)
processing_method
- The processing method to get this location.public void removeGpsData()
public java.lang.String getWhiteBalance()
WHITE_BALANCE_AUTO
,
WHITE_BALANCE_INCANDESCENT
,
WHITE_BALANCE_FLUORESCENT
,
WHITE_BALANCE_WARM_FLUORESCENT
,
WHITE_BALANCE_DAYLIGHT
,
WHITE_BALANCE_CLOUDY_DAYLIGHT
,
WHITE_BALANCE_TWILIGHT
,
WHITE_BALANCE_SHADE
public void setWhiteBalance(java.lang.String value)
value
- new white balance.getWhiteBalance()
public java.util.List<java.lang.String> getSupportedWhiteBalance()
getWhiteBalance()
public java.lang.String getColorEffect()
EFFECT_NONE
,
EFFECT_MONO
,
EFFECT_NEGATIVE
,
EFFECT_SOLARIZE
,
EFFECT_SEPIA
,
EFFECT_POSTERIZE
,
EFFECT_WHITEBOARD
,
EFFECT_BLACKBOARD
,
EFFECT_AQUA
public void setColorEffect(java.lang.String value)
value
- new color effect.getColorEffect()
public java.util.List<java.lang.String> getSupportedColorEffects()
getColorEffect()
public java.lang.String getAntibanding()
ANTIBANDING_AUTO
,
ANTIBANDING_50HZ
,
ANTIBANDING_60HZ
,
ANTIBANDING_OFF
public void setAntibanding(java.lang.String antibanding)
antibanding
- new antibanding value.getAntibanding()
public java.util.List<java.lang.String> getSupportedAntibanding()
getAntibanding()
public java.lang.String getSceneMode()
SCENE_MODE_AUTO
,
SCENE_MODE_ACTION
,
SCENE_MODE_PORTRAIT
,
SCENE_MODE_LANDSCAPE
,
SCENE_MODE_NIGHT
,
SCENE_MODE_NIGHT_PORTRAIT
,
SCENE_MODE_THEATRE
,
SCENE_MODE_BEACH
,
SCENE_MODE_SNOW
,
SCENE_MODE_SUNSET
,
SCENE_MODE_STEADYPHOTO
,
SCENE_MODE_FIREWORKS
,
SCENE_MODE_SPORTS
,
SCENE_MODE_PARTY
,
SCENE_MODE_CANDLELIGHT
public void setSceneMode(java.lang.String value)
value
- scene mode.getSceneMode()
public java.util.List<java.lang.String> getSupportedSceneModes()
getSceneMode()
public java.lang.String getFlashMode()
FLASH_MODE_OFF
,
FLASH_MODE_AUTO
,
FLASH_MODE_ON
,
FLASH_MODE_RED_EYE
,
FLASH_MODE_TORCH
public void setFlashMode(java.lang.String value)
value
- flash mode.getFlashMode()
public java.util.List<java.lang.String> getSupportedFlashModes()
getFlashMode()
public java.lang.String getFocusMode()
BarCodeReader.autoFocus(AutoFocusCallback)
to start the focus if focus
mode is FOCUS_MODE_AUTO or FOCUS_MODE_MACRO.FOCUS_MODE_AUTO
,
FOCUS_MODE_INFINITY
,
FOCUS_MODE_MACRO
,
FOCUS_MODE_FIXED
,
FOCUS_MODE_EDOF
,
FOCUS_MODE_CONTINUOUS_VIDEO
public void setFocusMode(java.lang.String value)
value
- focus mode.getFocusMode()
public java.util.List<java.lang.String> getSupportedFocusModes()
getFocusMode()
public float getFocalLength()
public float getHorizontalViewAngle()
public float getVerticalViewAngle()
public int getExposureCompensation()
getMinExposureCompensation()
to getMaxExposureCompensation()
. 0 means exposure is not
adjusted.public void setExposureCompensation(int value)
value
- exposure compensation index. The valid value range is
from getMinExposureCompensation()
(inclusive) to getMaxExposureCompensation()
(inclusive). 0 means exposure is
not adjusted. Application should call
getMinExposureCompensation and getMaxExposureCompensation to
know if exposure compensation is supported.public int getMaxExposureCompensation()
getMinExposureCompensation()
return 0,
exposure compensation is not supported.public int getMinExposureCompensation()
getMaxExposureCompensation()
return 0,
exposure compensation is not supported.public float getExposureCompensationStep()
public int getZoom()
isZoomSupported()
before
using this method.getMaxZoom()
. 0 means the reader is not zoomed.public void setZoom(int value)
BarCodeReader.PictureCallback
. The preview size remains the
same in zoom. Applications should check isZoomSupported()
before using this method.value
- zoom value. The valid range is 0 to getMaxZoom()
.public boolean isZoomSupported()
public int getMaxZoom()
setZoom(int)
.
Applications should call isZoomSupported()
before using this
method. This value may change in different preview size. Applications
should call this again after setting preview size.public java.util.List<java.lang.Integer> getZoomRatios()
isZoomSupported()
before using this method.getMaxZoom()
+ 1. The list is sorted from small to large. The
first element is always 100. The last element is the zoom
ratio of the maximum zoom value.public boolean isSmoothZoomSupported()
public void getFocusDistances(float[] output)
BarCodeReader.autoFocus(AutoFocusCallback)
, BarCodeReader.cancelAutoFocus()
, or BarCodeReader.startPreview()
. Applications can call BarCodeReader.getParameters()
and this method anytime to get the latest focus distances. If the
focus mode is FOCUS_MODE_CONTINUOUS_VIDEO, focus distances may change
from time to time.
This method is intended to estimate the distance between the reader
and the subject. After autofocus, the subject distance may be within
near and far focus distance. However, the precision depends on the
reader hardware, autofocus algorithm, the focus area, and the scene.
The error can be large and it should be only used as a reference.
Far focus distance >= optimal focus distance >= near focus distance.
If the focus distance is infinity, the value will be
Float.POSITIVE_INFINITY.output
- focus distances in meters. output must be a float
array with three elements. Near focus distance, optimal focus
distance, and far focus distance will be filled in the array.FOCUS_DISTANCE_NEAR_INDEX
,
FOCUS_DISTANCE_OPTIMAL_INDEX
,
FOCUS_DISTANCE_FAR_INDEX