Package io.anyline2.camera
Interface FlashControl
-
- All Implemented Interfaces:
@Deprecated() public interface FlashControl
An interface that should be implemented on Views that control the flash.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
FlashControl.Mode
-
Method Summary
Modifier and Type Method Description abstract void
setMode(FlashControl.Mode mode)
Implementer should switch to the given mode. abstract void
setAutoModeEnabled(boolean isEnabled)
Implementer should enable the auto mode and switch to it, if enabled. abstract void
setFlashOnIfAuto(boolean isOn)
Implementer should set the flash on/off if the control is in auto mode. abstract void
setCameraController(CameraController cameraController)
A camera is required to set the flash (at least for android <M). -
-
Method Detail
-
setMode
abstract void setMode(FlashControl.Mode mode)
Implementer should switch to the given mode. Default mode should be OFF.
- Parameters:
mode
- the mode to set to.
-
setAutoModeEnabled
abstract void setAutoModeEnabled(boolean isEnabled)
Implementer should enable the auto mode and switch to it, if enabled. Should be disabled by default. The auto mode can still require the user of the implementers view to call setFlashOnIfAuto.
- Parameters:
isEnabled
- true to enable auto mode, false to disable it.
-
setFlashOnIfAuto
abstract void setFlashOnIfAuto(boolean isOn)
Implementer should set the flash on/off if the control is in auto mode.
- Parameters:
isOn
- true to set the flash on if in auto mode, false to
-
setCameraController
abstract void setCameraController(CameraController cameraController)
A camera is required to set the flash (at least for android <M). Implementer should check if flash is possible for this device in here, and don't show the view at all if not.
Implementer should set the gui back to default when this is called with a none null camera. (This may be called in the background, so post gui stuff)
- Parameters:
cameraController
- the camera to use
-
-
-
-