com.honeywell.imagingmanager
Class ImagingManager

java.lang.Object
  extended by com.honeywell.imagingmanager.ImagingManager
All Implemented Interfaces:
ImageConst

public class ImagingManager
extends java.lang.Object
implements ImageConst

ImagingManager contains methods for capturing, previewing and image processing.


Field Summary
 
Fields inherited from interface com.honeywell.imagingmanager.ImageConst
CAPTUERED_IMAGE_HEIGHT, CAPTUERED_IMAGE_WIDTH, IMAGE_JPEG, IMAGE_PNG, MESSAGE_BEGIN_SAVE, MESSAGE_GETFRAME, MESSAGE_PREVIEWING, MESSAGE_READY_DOCODER, MESSAGE_READY_TO_IMAGE, MESSAGE_READY_TO_PREVIEW, MESSAGE_STOP_PREVIEW, MESSAGE_UPDATE_IMG, MESSAGE_UPDATE_PREVEIW, MESSAGE_UPDATE_ZOOMBAR, MESSAGE_UPDATE_ZOOMBUTTON, OPERATION_FRAME, OPERATION_PREVIEWING, OPERATION_STOPPREVIEW, PREVIEW_RATIO, PROFILE_BW, PROFILE_DISTANT, PROFILE_DOCUMENT, PROFILE_GS, PROFILE_LOW_LIGHT, PROFILE_NORMAL
 
Constructor Summary
ImagingManager(Context context, Handler hander)
          Constructors shows that ImagingManager needs 3 parameters to accomplish the whole functionality.
 
Method Summary
 int doImageAction(BitmapParcel bmpparcel, int type)
          Do real image functionality depending on type when decoder is ready.
 java.lang.String getAPIRevision()
          Return a string containing the current revision information of decoder service.
 int getEngineID()
          Return the ID of the image engine.
 int getEngineType()
          Return the Type of the image engine.
 int getImageHeight()
          Get the width of image captured from engine.
 void getImagerProperties(ImagerProperties imgProp)
           
 int getImageWidth()
          Get the width of captured image from engine.
 byte[] getLastImage(ImageAttributes imgProperty)
           
 int getPreviewingWidth()
          Get the width of captured image from engine.
 int getPreviewngHeight()
          Get the width of image captured from engine.
 int ImageProcessingFrame(Bitmap bmpin, Bitmap bmpout, int type)
          Make the bitmap object to be image processed and translated to corresponding format.
 int release()
          Closes the connection to decoder service.
 boolean saveBitmap(java.lang.String filename, int imagetype, Bitmap bitmap)
          Saves captured image into a file with specified path.
 void sendImageRequest(int type)
          Send a request to decoder to do imaging functionality.
 int setExposureMode(int mode)
           
 int setExposureSettings(int[] expSettings)
           
 int setLightMode(int mode)
          This method is called to control light mode.
 int setProfileType(int type)
          Set profile type of imaging.
 int startScanning()
          Start scanning procedure.
 int stopScanning()
          Stop scanning procedure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImagingManager

public ImagingManager(Context context,
                      Handler hander)
Constructors shows that ImagingManager needs 3 parameters to accomplish the whole functionality.

Parameters:
context - The Context of application which wants to launch Imaging.
hander - The Handler object to handle some messages from capturing and previewing procedure; usually it will refresh the screen to show image or previewing image.
view - The ImagingView object to control the appearance of image.
Method Detail

release

public int release()
            throws java.io.IOException
Closes the connection to decoder service. Usually it should be invoked in Activity's onPause().

Returns:
Returns the result of capturing, 0 indicate success
Throws:
java.io.IOException

getImageWidth

public int getImageWidth()
Get the width of captured image from engine.


getImageHeight

public int getImageHeight()
Get the width of image captured from engine.


getPreviewingWidth

public int getPreviewingWidth()
Get the width of captured image from engine.


getPreviewngHeight

public int getPreviewngHeight()
Get the width of image captured from engine.


doImageAction

public int doImageAction(BitmapParcel bmpparcel,
                         int type)
Do real image functionality depending on type when decoder is ready.

Parameters:
bmpparcel - Wrap a bitmap object to be captured or previewing.
type - If type equals 0, do capture procedure and the wrapped bitmap's resolution is getImageWidth() and getImageWidth().If image functionality is successful, send MESSAGE_IMAAGE_SUC to main thread. If type equals 1 ,do previewing frame and the wapped bitmap's resolution is getPreviewingWidth() and getPreviewngHeight().If image functionality is successful, send MESSAGE_PRVIEWING_SUC to main thread.

sendImageRequest

public void sendImageRequest(int type)
Send a request to decoder to do imaging functionality.

Parameters:
type - If type equals 0, a request for capturing. If type equals 1 ,a request for previewing.

setProfileType

public int setProfileType(int type)
Set profile type of imaging.

Returns:
Returns the result of setting profile, 0 indicate success

ImageProcessingFrame

public int ImageProcessingFrame(Bitmap bmpin,
                                Bitmap bmpout,
                                int type)
Make the bitmap object to be image processed and translated to corresponding format.

Parameters:
bmpin - The bitmap object to be passed into to do image processing.
bmpout - The bitmap object to be shown.
type - The bitmap object to be shown.
Returns:
Returns the result of image processing, 0 indicate success

setLightMode

public int setLightMode(int mode)
This method is called to control light mode.

Parameters:
mode - Desired lights mode @see com.honeywell.decodemanager.barcode.CommonDefine.LightsMode

saveBitmap

public boolean saveBitmap(java.lang.String filename,
                          int imagetype,
                          Bitmap bitmap)
Saves captured image into a file with specified path.

Parameters:
filename - The string object contains the absolute path. If filename is NULL, try to save captured image into a file with an appointed file path.
imagetype - The type of image formate:IMAGE_PNG or IMAGE_JPEG.
bitmap - The Bitmap object to be compressed into a image file
Returns:
Whether the procedure of saving image is successful.

getEngineID

public int getEngineID()
Return the ID of the image engine.

Returns:
The ID of installed image engine.

getEngineType

public int getEngineType()
Return the Type of the image engine.

Returns:
The Type of installed image engine.

startScanning

public int startScanning()
Start scanning procedure.

Returns:
The result of starting scanning.

stopScanning

public int stopScanning()
Stop scanning procedure.

Returns:
The result of stopping scanning.

setExposureSettings

public int setExposureSettings(int[] expSettings)

setExposureMode

public int setExposureMode(int mode)

getImagerProperties

public void getImagerProperties(ImagerProperties imgProp)

getAPIRevision

public java.lang.String getAPIRevision()
Return a string containing the current revision information of decoder service.

Returns:
Upon successful return, this string is filled in with the revision information of the libImaging.so.
Throws:
RemoteException

getLastImage

public byte[] getLastImage(ImageAttributes imgProperty)