to top
Datalogic APIs
public class

CameraWedgePreviewManager

extends Object
java.lang.Object
   ↳ com.datalogic.decode.CameraWedgePreviewManager

Class Overview

CameraWedgePreviewManager is a class used to setup a preview that will be shown when the camera wedge feature is running, but only when no barcode is shown. It can be useful in case the user wants to show a custom message or logo.

Summary

Public Methods
Bitmap getInstalled()
Gets the installed camera wedge preview image.
static CameraWedgePreviewManager getInstance()
Gets an instance of the CameraWedgePreviewManager, if it is supported by the platform.
int install(Bitmap bmp, boolean scalingEnabled)
Install a preview image to show during camera wedge when no barcode is shown.
int install(Bitmap bmp)
Install a preview image to show during camera wedge when no barcode is shown.
int install(String path)
Install a preview image to show during camera wedge when no barcode is shown.
int install(String path, boolean scalingEnabled)
Install a preview image to show during camera wedge when no barcode is shown.
int remove()
Remove the camera wedge preview image previously installed, if found.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public Bitmap getInstalled ()

Added in revision 46

Gets the installed camera wedge preview image.

Returns
  • The camera wedge preview image if found, null otherwise or in case of error if the exceptions are disabled.
Throws
DecodeException in case of error, when exceptions are enabled through the ErrorManager singleton.

public static CameraWedgePreviewManager getInstance ()

Added in revision 46

Gets an instance of the CameraWedgePreviewManager, if it is supported by the platform.

Returns
  • A CameraWedgePreviewManager object if supported, null otherwise.

public int install (Bitmap bmp, boolean scalingEnabled)

Added in revision 46

Install a preview image to show during camera wedge when no barcode is shown. The input image will be centered into a 1080x1920 frame, applying scaling only if the specified parameter is set to true.

Parameters
bmp The image to install.
scalingEnabled True if the image should be scaled after being centered into a frame of size 1080x1920. The scaling will preserve the aspect ratio.
Returns
  • DecodeException.SUCCESS in case it succeeds, otherwise it returns an error code if the exceptions are disabled or throws a DecodeException in case the exceptions are enabled.
Throws
DecodeException in case of error, when exceptions are enabled through the ErrorManager singleton.

public int install (Bitmap bmp)

Added in revision 46

Install a preview image to show during camera wedge when no barcode is shown. Performs no scaling of the input image, which will be centered into a 1080x1920 frame.

Parameters
bmp The image to install. If the image doesn't fit the 1080x1920 frame, it will only be centered.
Returns
  • DecodeException.SUCCESS in case it succeeds, otherwise it returns an error code if the exceptions are disabled or throws a DecodeException in case the exceptions are enabled.
Throws
DecodeException in case of error, when exceptions are enabled through the ErrorManager singleton.

public int install (String path)

Added in revision 46

Install a preview image to show during camera wedge when no barcode is shown. Performs no scaling of the input image, which will be centered into a 1080x1920 frame.

Parameters
path The path to the file containing the image. In order to be used, the file must be accessible by the application itself. If the image doesn't fit the 1080x1920 frame, it will only be centered.
Returns
  • DecodeException.SUCCESS in case it succeeds, otherwise it returns an error code if the exceptions are disabled or throws a DecodeException in case the exceptions are enabled.
Throws
DecodeException in case of error, when exceptions are enabled through the ErrorManager singleton.

public int install (String path, boolean scalingEnabled)

Added in revision 46

Install a preview image to show during camera wedge when no barcode is shown. The input image will be centered into a 1080x1920 frame, applying scaling only if the specified parameter is set to true.

Parameters
path The path to the file containing the image. In order to be used, the file must be accessible by the application itself.
scalingEnabled True if the image should be scaled after being centered into a frame of size 1080x1920. The scaling will preserve the aspect ratio.
Returns
  • DecodeException.SUCCESS in case it succeeds, otherwise it returns an error code if the exceptions are disabled or throws a DecodeException in case the exceptions are enabled.
Throws
DecodeException in case of error, when exceptions are enabled through the ErrorManager singleton.

public int remove ()

Added in revision 46

Remove the camera wedge preview image previously installed, if found.

Returns
  • DecodeException.SUCCESS in case it succeeds, otherwise it returns an error code if the exceptions are disabled or throws a DecodeException in case the exceptions are enabled.
Throws
DecodeException in case of error, when exceptions are enabled through the ErrorManager singleton.