javax.microedition.amms.control.camera
Interface FlashControl

All Superinterfaces:
Control

public interface FlashControl
extends 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.

Since:
BlackBerry API 5.0.0

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()
           
 int[] getSupportedModes()
           
 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
Since:
BlackBerry API 5.0.0

AUTO

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

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

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
Since:
BlackBerry API 5.0.0

FORCE

static final int FORCE
Camera flash is on.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

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
Since:
BlackBerry API 5.0.0

FILLIN

static final int FILLIN
Reduced flash.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0


Method Detail

getSupportedModes

int[] getSupportedModes()
Returns:
Available flash modes are: OFFAUTOAUTO_WITH_REDEYEREDUCEFORCEFORCE_WITH_REDEYEREDUCEFILLIN

supported flash modes

Since:
BlackBerry API 5.0.0

setMode

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

Parameters:
mode - the new flash mode
Throws:
IllegalArgumentException - if the given mode is not supported
Since:
BlackBerry API 5.0.0

getMode

int getMode()
Returns:

the flash mode of the camera device

Since:
BlackBerry API 5.0.0

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
Since:
BlackBerry API 5.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal