JSR-234 1.1

javax.microedition.amms.control.camera
Interface FlashControl

All Superinterfaces:
javax.microedition.media.Control

public interface FlashControl
extends javax.microedition.media.Control

FlashControl controls the flash of the camera device.

When the flash is on (mode is not OFF), the flash is used when the snapshots are taken. Setting up the flash usually takes some time so when the flash is used and a snapshot is taken either by VideoControl or SnapshotControl, the exact time when the snapshot will be taken depends on the flash device. If the flash device will not be able to flash, for instance, because the battery of the device cannot charge the flash, taking the snapshot will result in an error.

The default mode for flash is OFF.


Field Summary
static int AUTO
          The camera will autoflash according to the lighting conditions.
static int AUTO_WITH_REDEYEREDUCE
          The camera will autoflash according to the lighting conditions and if it flashes it will use red-eye reduction.
static int FILLIN
          Reduced flash.
static int FORCE
          Camera flash is on.
static int FORCE_WITH_REDEYEREDUCE
          Camera flash is on and red-eye reduction is in use.
static int OFF
          Camera flash is off.
 
Method Summary
 int getMode()
          Returns the flash mode of the camera device.
 int[] getSupportedModes()
          Returns a list of flash modes supported by the camera device.
 boolean isFlashReady()
          Tells if the flash device is ready.
 void setMode(int mode)
          Sets the flash mode of a camera device.
 

Field Detail

OFF

static final int OFF
Camera flash is off.

See Also:
Constant Field Values

AUTO

static final int AUTO
The camera will autoflash according to the lighting conditions.

See Also:
Constant Field Values

AUTO_WITH_REDEYEREDUCE

static final int AUTO_WITH_REDEYEREDUCE
The camera will autoflash according to the lighting conditions and if it flashes it will use red-eye reduction.

See Also:
Constant Field Values

FORCE

static final int FORCE
Camera flash is on.

See Also:
Constant Field Values

FORCE_WITH_REDEYEREDUCE

static final int FORCE_WITH_REDEYEREDUCE
Camera flash is on and red-eye reduction is in use.

See Also:
Constant Field Values

FILLIN

static final int FILLIN
Reduced flash.

See Also:
Constant Field Values
Method Detail

getSupportedModes

int[] getSupportedModes()
Returns a list of flash modes supported by the camera device. Available flash modes are:

Returns:
supported flash modes

setMode

void setMode(int mode)
Sets the flash mode of a camera device.

Parameters:
mode - the new flash mode
Throws:
java.lang.IllegalArgumentException - if the given mode is not supported
See Also:
getSupportedModes()

getMode

int getMode()
Returns the flash mode of the camera device.

Returns:
the flash mode of the camera device
See Also:
getSupportedModes()

isFlashReady

boolean isFlashReady()
Tells if the flash device is ready.

Setting up the flash device usually takes some time. This method tells if the flash device is ready for use.

Returns:
true if the flash is ready, false otherwise

JSR-234 1.1

Copyright © 2004-2007 Nokia Corporation. See the Copyright for details.