to top
Datalogic APIs
public class

CameraInputDevice

extends Object
implements InputDevice
java.lang.Object
   ↳ com.datalogic.decode.CameraInputDevice

Class Overview

Input device representing a Camera. If this is set as the current input device in the BarcodeManager, the frames will be captured from the specified Camera.

Summary

Nested Classes
class CameraInputDevice.FitScreenPreviewDisplayMode Class representing the display mode used to fit the preview to the screen on the shortest size. 
class CameraInputDevice.ManualPositioningPreviewDisplayMode Class representing the display mode used to manually position the preview. 
class CameraInputDevice.PreviewDisplayMode Abstract class representing the display mode to use for the camera preview. 
class CameraInputDevice.PreviewSize Class representing a preview size. 
Public Methods
String getCameraId()
Returns the ID of the camera as seen by the Android system.
CameraInputDevice.PreviewSize getCurrentPreviewSize()
Returns the current preview size.
int getFacing()
Returns the camera facing as defined by the Android system.
String getName()
Returns the name of the input device.
int getOrientation()
Returns the camera orientation as defined by the Android system.
CameraInputDevice.PreviewDisplayMode getPreviewDisplayMode()
Returns the display mode in use of the preview.
List<CameraInputDevice.PreviewSize> getSupportedPreviewSizes()
Returns the supported preview sizes.
InputDevice.Type getType()
Returns the type of input device between the ones defined by the InputDevice.Type enumeration.
void setCurrentPreviewSize(CameraInputDevice.PreviewSize currentPreviewSize)
Sets the current preview size.
void setPreviewDisplayMode(CameraInputDevice.PreviewDisplayMode previewDisplayMode)
Sets the current display mode of the preview.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.datalogic.decode.InputDevice

Public Methods

public String getCameraId ()

Added in revision 33

Returns the ID of the camera as seen by the Android system.

Returns
  • The camera ID.

public CameraInputDevice.PreviewSize getCurrentPreviewSize ()

Added in revision 33

Returns the current preview size.

Returns
  • The current preview size.

public int getFacing ()

Added in revision 33

Returns the camera facing as defined by the Android system.

Returns
  • The camera facing.

public String getName ()

Added in revision 33

Returns the name of the input device.

Returns
  • The name of the input device.

public int getOrientation ()

Added in revision 33

Returns the camera orientation as defined by the Android system.

Returns
  • The camera orientation.

public CameraInputDevice.PreviewDisplayMode getPreviewDisplayMode ()

Added in revision 33

Returns the display mode in use of the preview.

Returns
  • The preview display mode.

public List<CameraInputDevice.PreviewSize> getSupportedPreviewSizes ()

Added in revision 33

Returns the supported preview sizes.

Returns
  • The supported preview sizes.

public InputDevice.Type getType ()

Added in revision 33

Returns the type of input device between the ones defined by the InputDevice.Type enumeration.

Returns
  • The type of input device.

public void setCurrentPreviewSize (CameraInputDevice.PreviewSize currentPreviewSize)

Added in revision 33

Sets the current preview size.

Parameters
currentPreviewSize The preview size to set.

public void setPreviewDisplayMode (CameraInputDevice.PreviewDisplayMode previewDisplayMode)

Added in revision 33

Sets the current display mode of the preview.

Parameters
previewDisplayMode The display mode to set.